Commit Briefs

f1aec6edf3 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@


49c543a6fe 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.


10a623dfc2 Stefan Sperling

sort and de-duplicate work tree path command line arguments

This is important in cases like 'got diff file.txt file.txt' which should only show the diff for file.txt once. suggested by kn@




f6cae3ed1e Christian Weisgerber

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

ok stsp


7fb414ae4d 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



e730362696 Stefan Sperling

add submodule tests

ok semarie


dbb83fbd81 Stefan Sperling

there's no need to store a directory path in struct schedule_addition_args

ok tracey




6d022e9747 Stefan Sperling

use get_worktree_paths_from_argv consistently; improves add/rm edge cases

Double 'got rm' becomes a no-op like double 'got add' already is, and 'got add' of an already staged file is now an error.


a9fa2909b9 Stefan Sperling

fix 'got revert' on files in newly added subdirectories


8d301dd94c Stefan Sperling

use cmp -s, instead of cmp, in all command line tests



723c305ce4 joshua stein

got: support adding multiple files at a time

make adding files already in the file-index not a fatal error


a7c182ac81 Stefan Sperling

missing error return in test_double_add


5c99ca9fe4 Stefan Sperling

fix behaviour when 'got add' is used twice