Commit Briefs

78f5ac2436 Omar Polo

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@




9b4603c029 Stefan Sperling

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

ok tracey


692bdcc498 Stefan Sperling

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

ok millert@


4e12cd97c0 Stefan Sperling

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

ok millert@




c0df59665d Stefan Sperling

wrap overlong lines


e7ae0bafef Stefan Sperling

add O_CLOEXEC (close-on-exec) to openat(2) calls

suggested by millert ok thomas_adam


8bd0cdad05 Stefan Sperling

add O_CLOEXEC (close-on-exec) flag to open(2) calls

suggested by millert ok thomas_adam


00fe21f262 Stefan Sperling

add "e" (close-on-exec) flag to fopen(3) calls

suggested by millert ok thomas_adam


0e03968138 Stefan Sperling

preverse binary files during updates and merges


7d69d862a0 Stefan Sperling

let gotadmin find the repository automatically if invoked in a work tree

Move a small amount of code from worktree.c to a new file worktree_open.c, which contains everything required to open and close a work tree and inspect some of its basic parameters. This can be used by gotadmin. ok tracey


62da319662 Stefan Sperling

skip ignored directories during 'got status' disk crawl


0ff8d23662 Stefan Sperling

show commit progress output when 'got merge -c' is used

Otherwise no progress output is shown at all with this command. Commit progress output will also display any additional changes which resulted from conflict resolution. ok millert@


5c02d2a555 Stefan Sperling

for portability, handle errno variations upon open(2) failure with O_NOFOLLOW

Problem pointed out by naddy for FreeBSD -portable. Discussed with millert, thomas adam, and naddy.


5267b9e496 Stefan Sperling

allow bad symlinks to survive a merge

Commands which perform merges will now install bad symlinks as symlinks in the work tree, instead of creating them as regular files. This means bad symlinks committed with 'got commit -S' (or Git) will be preserved. The decision to introduce a bad symlink is done at commit-time and merges should not forcefully reverse this decision. The cherrypick and backout commands require a manual commit step, and a merge result with bad symlinks will require use of 'got commit -S'. Additional testing by thomas adam


f6764181d7 Stefan Sperling

fix 'got update' of an added + obstructed file

When 'got update' tried to add a new file to the work tree and this file was obstructed by, say, a directory on disk, the update failed: $ got update ? new got: new: Is a directory $ And the work tree was not updated. With this commit this situation is properly detected as an obstruction and the update succeeds: $ got update ~ new Updated to refs/heads/master: c1f85b4938dc4c668a88f13df2b98a520fc077cc File paths obstructed by a non-regular file: 1 $ Extend a corresponding test case to cover this issue. ok tracey



f259c4c182 Stefan Sperling

add a 'got merge' command for creating merge commits

Additional testing by Thomas Adam. ok tracey


abc59930d5 Christian Weisgerber

indentation fixes


69de9dd421 Stefan Sperling

limit checks for merge conflicts to files affected by the merge

Performance problems reported by naddy


5546d4669c Stefan Sperling

plug a memory leak in check_merge_ok()


243a13f59c Stefan Sperling

fix bogus error when 'got cherrypick' merges changes into a locally added file

reported by + ok naddy