This changes "git-foo" to "git foo" when message strings in tests
name git subcommands.
Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The CVS_SERVER environment variable can cause some of the cvsimport tests
to fail. So unset this variable at the beginning of the test script.
Signed-off-by: Fabian Emmes <fabian.emmes@rwth-aachen.de>
Signed-off-by: Lars Noschinski <lars@public.noschinski.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
We've supported cvsps 2.1 so far. Newer 2.2b1 (beta) seems to work with
us, too.
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
As a general principle, we should not use "git diff" to validate the
results of what git command that is being tested has done. We would not
know if we are testing the command in question, or locating a bug in the
cute hack of "git diff --no-index".
Rather use test_cmp for that purpose.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This fixes the remainder of the issues where the test script itself is at
fault for failing when the git checkout path contains whitespace or other
shell metacharacters.
The majority of git svn tests used the idiom
test_expect_success "title" "test script using $svnrepo"
These were changed to have the test script in single-quotes:
test_expect_success "title" 'test script using "$svnrepo"'
which unfortunately makes the patch appear larger than it really is.
One consequence of this change is that in the verbose test output the
value of $svnrepo (and in some cases other variables, too) is no
longer expanded, i.e. previously we saw
* expecting success:
test script using /path/to/git/t/trash/svnrepo
but now it is:
* expecting success:
test script using "$svnrepo"
Signed-off-by: Bryan Donlan <bdonlan@fushizen.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This actually sounds like a bug in cvsps, which requires an existing
home directory when asked for the usage through -h
$ HOME=/nonexistent cvsps -h
Cannot create the cvsps directory '.cvsps': No such file or directory
This made t9600 think that cvsps is not available if HOME did not exist,
causing the tests to be skipped
$ HOME=/nonexistent sh t9600-cvsimport.sh
* skipping cvsimport tests, cvsps not found
* passed all 0 test(s)
Now t9600 sets HOME to the current working directory before checking for
the availability of the cvsps program.
This issue has been discovered by Marco Rodrigues, and fixed by Frank
Lichtenheld through
http://bugs.debian.org/471969
Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-cvsimport won't run at all with less than cvsps 2.1, because it
lacks the -A flag. But there's no point in preventing people who have an
old cvsps from running the full testsuite.
Tested-by: A Large Angry SCM <gitzilla@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
There were two problems:
1. We only look at the config variable if there is no module
given on the command line. We checked this by comparing
@ARGV == 0. However, at the time of the comparison, we
have not yet parsed the dashed options, meaning that
"git cvsimport" would read the variable but "git
cvsimport -a" would not. This is fixed by simply moving
the check after the call to getopt.
2. If the config variable did not exist, we were adding an
empty string to @ARGV. The rest of the script, rather
than barfing for insufficient input, would then try to
import the module '', leading to rather confusing error
messages. Based on patch from Emanuele Giaquinta.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Previously, if refs were packed, git-cvsimport would assume
that particular refs did not exist. This could lead to, for
example, overwriting previous 'origin' commits that were
packed.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
We weren't even testing basic things before, so let's at
least try importing and updating a trivial repository, which
will catch total breakage.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>