Commits


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


portable: regress: fix sed parsing When making sed's command-line flags portable, don't split on $@ before parsing it, as this won't preserve the original string which needs passing to sed unmodified if it's never had to be changed.


portable: regress: improve sed handling When massaging sed command strings, to handle the differences between "-i ''" not meaning the same thing on non-BSD systems, this previously used a bashism to determine the positional arguments. Instead, defer to using a loop which doesn't rely on bashisms.


portable: regress: remove backticks from string Remove erroneously-placed backticks when describing a lack of GNU coreutils.


portable: regress: make OS-detection sh-compatible Don't rely on $OSTYPE being available, which it isn't in strict POSIX mode. Ubuntu's sh is often alised to dash, and hence this fails. Instead, default to using the output from 'uname'.


portable: regress: harden coreutils check When running tests on non-Linux systems, it was just assumed that GNU coreutils had been installed. This meant that the wrapper commands for date/ln on those systems always had gdate and gln installed. Rather than assume that, check to see if the GNU coreutils versions as present, and if not echo a warning.


portable: regress: set PLATFORM when running direct PLATFORM is populated when running via `./configure && make` but this isn't guaranteed if an individual test is run directly, such as `regress/cmdline/tag.sh`. In such cases, PLATFORM will be empty, but we still want to use it. Since we test for non-linux values, only set PLATFORM if we're running on Linu so that the correct commands are used.


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.


portable: regress: improve sed "-i ''" on linux GNU sed doesn't like "-i ''" which on BSD means to not keep backups around. Scan for "-i ''" and replace with just "-i" which will use the filename given to sed just fine.


simpler fix equivalent to the previous commit


portable: running tests when shell is dash Ubuntu's default shell is dash, when using /bin/sh. The portable nature of got is such that "$OSTYPE" to determine the host type (linux, bsd, etc.) is bash-specific and is not part of POSIX. autotools already provide a mechanism for determining the underlying platform type, and PLATFORM is already a subst value. Therefore, let the -portable parts of the regress test-suite use $PLATFORM to look at the underlying OS type. The tests themselves already expect /bin/sh to be POSIX-compliant in all other areas, so there should be no need to change the #! lines.


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.


regress: use gdate/gln if on *BSD To minimise the amount of churn between the difference in date(1) and ln(n) semantics, use gdate and gln from coreutils.


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


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


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


add symlink support to 'got import'