Commit Briefs

Thomas Adam

regress: make cmdline tests sh compatible

Ensure shell scripts can run under more POSIX-restricted shells. OK op@


Christian Weisgerber

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

ok stsp


Mark Jamsek

update backout/cherrypick regress for worktree UUID output

ok stsp@


Mark Jamsek

show worktree UUID in backout/cherrypick -l output

When run from the repository, display the UUID to help the user know which logmsg refs belong to which work tree. Also, use "backout" or "cherrypick" in the log message header to distinguish output from 'got log'. Suggested by stsp on irc. ok stsp@


Stefan Sperling

uppercase cherrypick/backout -X progress output

ok jamsek


Mark Jamsek

regress for new backout/cherrypick logmsg references

Tests only cover the -lX interface to list and delete logmsg refs created by previous backout and cherrypick operations. Further tests are needed for revert and commit coverage to ensure that the correct log messages of bo/cy commits are loaded into the editor when 'got commit' is run, and that only the refs used to populate the editor for the new commit are deleted. Potential printf issues observed by op remain in the diff; noted here as a reminder to do a sweep at some point in the future as there are other such instances in cherrypick.sh and possibly elsewhere in regress. Reviewed as part of previous commit introducing logmsg ref support for backed-out/cherrypicked commits. ok stsp@


Omar Polo

respect umask when creating or changing files and directories

This behaviour is already documented in got-worktree(5) but wasn't actually implemented. ok stsp@


Stefan Sperling

fix regression test failures with Git 3.30.5 / 2.38.1 or later installed

The fix for CVE-2022-39253 in Git made our regression tests fail since creating submodules from local clones is no longer allowed by default. Add an override to our invocations of "git submodule add", the same which was added to Git's regression test suite as part of their fix. This CVE doesn't otherwise affect us. We do not implement submodules. Our use of them in regression tests exists only to ensure that Got does not freak out when it sees one. Precisely because automated support for nested repositories and/or working copies (as in Git Submodules, or Subversion Externals, etc.) have been an endless source of security problems in other systems. sudden test failures pointed out by naddy@



Stefan Sperling

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@



Omar Polo

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@


Christian Weisgerber

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: make test operands POSIX compliant

Since the interpreter for the regress shell scripts are using /bin/sh this will usually imply some level of POSIX compliance (that isn't bash-specific, for instance). Some systems use dash as their sh shell and as such is stricter POSIX compliance. To help -portable, make the shell test checks use a single '=' for equality, rather than '=='.



Stefan Sperling

fix merging of files which contain a dot on a line by itself

Annoying bug which we inherited from OpenRCS which inherited it from OpenBSD's diff3 program. ok tracey millert




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




Stefan Sperling

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

reported by + ok naddy


Stefan Sperling

fix unrelated changes being merged by got cherrypick/backout/rebase/histedit

This was a long-standing and very annoying bug. The two xfail tests in the cherrypick test suite are passing now.