Commits


add a basic regression test for 'got clone' over HTTP


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".


regress: nix 'set -A' kshism from tests As reported by naddy, this is a non-portable Korn shell construct. Instead, use the one argument array then make faux space-delimited string "arrays" for the other ids; they can still be indexed with pop_idx. improved by + ok naddy@


implement support for keywords as got <commit> arguments This begins enabling the use of keywords in got wherever commit ids or references are used, with more work intended to expand support across all such instances (e.g., branch, checkout, etc.), and add more keywords. The keywords ":base" and ":head" can be passed to 'got {diff,log,update} -c' commands as a substitute for the corresponding commit hash id. Keywords and references can also be modified by appending a ':+' or ':-' and an optional integer N to specify by first parent traversal the Nth generation descendant or antecedent, respectively. If N is omitted, a '1' is implicitly appended. tweaks + ok op and stsp


consistently use ten Xs in mkstemp(3) templates patch from Josiah Frentsos, thanks!


make diffing files which changed into dirs and vice-versa possible Problem marked with a TODO comment by me ages ago and rediscovered by naddy@ ok op@


regress: override locale settings ok stsp


regress: run gotadmin pack -D if $GOT_TEST_PACK=ref-delta ok stsp


regress: allow to run only a subset of the test cases This allows to run only the test cases named on the command line.


make read errors in gotsh serve_read() fatal and adjust tests accordingly ok jamsek


regress: strip trailing / from GOT_TEST_ROOT otherwise most test fails because of double "/" ending in paths and tricking some check into thinking that's failed. ok jamsek stsp


use GOT_IGNORE_GITCONFIG in regress fixes test_rebase_no_author_info when a valid ~/.gitconfig is found. ok stsp@


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.


simpler fix equivalent to the previous commit


remove loose objects if running tests with GOT_TEST_PACK


use 'gotadmin pack' instead of 'git repack' if testing with GOT_TEST_PACK


explicitly set the default branch name after 'git init' in regress tests We need to do this because newer versions of Git support an arbitrary default branch name which can be set by users. We don't want tests to fail when this option is used. pointed out by Thomas Adam


make 'got send' regression tests run 'git fsck' on all involved repositories


ensure that old commits remain referenced after rebase and histedit Create automatic "backup" references which ensure that objects from the pre-rebase or pre-histedit state remain in the repository. A new -l option for 'got rebase' and 'got histedit' lists old commits. This makes it easier to recover from botched rebase or histedit operations. Removal of such objects currently requires got ref -d and git-gc. This will be made more convenient in the future. testing and ok jrick


use POSIX [s1 = s2] syntax instead of [s1 == s2]; patch by Ryo ONODERA


rewrite argument parsing with the POSIX getopts shell built-in ok stsp


missed one case while changing $() to `` (found by rczlonka)


add quotes around $GOT_TEST_ROOT and avoid mktemp -p; suggested by naddy


allow regress test data to be stored in locations other than /tmp


replace ksh syntax with POSIX arithmetic expressions ok kn stsp