Commit Briefs

Thomas Adam

replace "(cd path && git cmd)" with "git -C path cmd"

This matches the existing use of "got -r path cmd" and "git_commit path args".


Thomas Adam

regress/cmdline: fix handling of unexpected success

Diff from James Cook, thanks!


Thomas Adam

portable: regress: add back GOT_TEST_PACK

The definition for GOT_TEST_PACK went walkies during a previous merge conflict. Add this back.


Thomas Adam

regress: replace "sed -i" with ed(1) for portable in-place editing

"sed -i" is fundamentally unportable. GNU and OpenBSD sed(1) treat the extension for the backup file as an optional argument and use "sed -i" for no backup file. FreeBSD sed(1) treats the extension as an obligatory argument and uses "sed -i ''" for no backup file. There is no single syntax that works for both. ok stsp op


Thomas Adam

regress: replace unportable ln -h option with rm && ln

ok stsp


Thomas Adam

always show commit or tree IDs in diff header, in order to help 'got patch'

The idea is that got patch can simply look for a line such as: commit - abcde1234567... to find the merge base commit ID to show in diff3 conflict markers. got log -p now displays commit IDs in its diff header, instead ofl tree or blob IDs. ok op@


Thomas Adam

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@


Thomas Adam

don't pass $ret to test_done on failure when it's known to be zero

Otherwise the test directory it's not left in place; ok tracey@


Thomas Adam

use test(1) -eq and -ne to compare integers, and reduce quoting

This brings the rest of the regression test scripts in line with patch.sh.


Thomas Adam

regress: provide a sed wrapper

In order to portably handle the difference in how 'sed -i' works between *BSD and Linux, provide a wrapper to invoke the underying system sed(1) based on which OSTYPE is in use.


Thomas Adam

regress: fix test failures using ln(1)

GNU ln uses -T instead of -h for no-target-directory. OK thomas.adam


Stefan Sperling

make 'got update' display the worktree's branch name upon success

ok tracey



Stefan Sperling

merge new diff implementation from the git.gameoftrees.org diff.git repository

This new diff implementation was started by Neels Hofmeyr during the u2k20 hackathon and now replaces diffreg.c code lifted from the OpenBSD base system. The integration of this code into Got was done by me. Got now uses the patience diff algorithm by default. The diff.git repository will remain the primary repository for the diff code, which already compiles and runs on other operating systems such as Linux. Any fixes and improvements for files inherited from the diff.git repository should be written against that repository and synced to got.git afterwards.


Christian Weisgerber

switch function declarations from Korn shell to Bourne/POSIX shell syntax

ok stsp


Stefan Sperling

add a -q option to tests for quiet output and use it for 'make regress'

Previous default output remains when test cases are run individually. ok tracey




Stefan Sperling

make 'got stage -p' work with symlinks



Stefan Sperling

make staging of symlinks work



Stefan Sperling

fix staging of multiple files with -p

ok semarie