Commits


got stage: implicitly unstage when staging the reverse of the staged diff otherwise we end up with a staged empty edit for that file. ok stsp@


move creation of tempfiles outside of lib/diff.c ok tracey


refactor got_patch / got_worktree_patch_complete let got_patch own fileindex_path and call got_worktree_patch_complete only if got_wokrtree_patch_prepare hasn't failed. suggested by stsp@


got patch: avoid open/sync/close the fileindex over and over again Instead of flushing the fileindex after every patch in the patchfile just reuse the same fileindex and sync it only at the end of the patch operation. This speeds up 'got patch' on large repositories by quite a lot.


don't pass relative paths to get_file_status


stop relying on commit cache for good performance of got_object_id_by_path() Instead of internally opening and closing the same commit object over and over again, require callers to pass an open commit object in. Avoids an inherent dependency on the commit object cache for reasonable performance. ok op@


move got_patch file status checking in worktree.c check_file_status used got_worktree_status to check if the file was in an allowed state, but it's wrong since the callback is not invoked on unchanged files. While here also fix a relate bug: unlink(newpath) is in the wrong spot and ends up removing files even when it shouldn't, so move it early in the got_worktree_schedule_* error handling. Finally, update the appropriate test case. It was passing before because got_worktree_schedule_add returned GOT_ERR_FILE_STATUS, not because check_file_status failed. ok stsp@


fix 'got status' with an obstructed file given as argument; found by Omar


fix 'got diff' on files which match an ignore pattern; found by Omar Polo


improve 'got add' error message if file does not exist; reported by Timo Myyrä ok tracey


make 'got rm' report an "unexpected status" error for unversioned files ok millert@


make 'got rm' behave like rm(1) for paths found missing on disk ok millert@


remove non-reachable 'return NULL' statement from report_single_file_status()


compress delta data from delta_cache directly into pack file


wrap overlong lines