Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2007-12-01 01:22:12 +0300
committerJunio C Hamano <gitster@pobox.com>2007-12-01 02:00:31 +0300
commit67d232426b8858b31e54a9b6a5a90916690d1153 (patch)
treee22c9a837118f214ede706c44c6ef3ed766dc254 /t/t9600-cvsimport.sh
parenta6214fe06eefded4f71012043f35ad805e7dd19c (diff)
cvsimport: fix usage of cvsimport.module
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>
Diffstat (limited to 't/t9600-cvsimport.sh')
-rwxr-xr-xt/t9600-cvsimport.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/t/t9600-cvsimport.sh b/t/t9600-cvsimport.sh
index 3338d447c5..29fee2dd13 100755
--- a/t/t9600-cvsimport.sh
+++ b/t/t9600-cvsimport.sh
@@ -98,4 +98,25 @@ test_expect_success 'update git module' '
'
+test_expect_success 'update cvs module' '
+
+ cd module-cvs &&
+ echo 1 >tick &&
+ cvs add tick &&
+ cvs commit -m 1
+ cd ..
+
+'
+
+test_expect_success 'cvsimport.module config works' '
+
+ cd module-git &&
+ git config cvsimport.module module &&
+ git cvsimport -a -z0 &&
+ git merge origin &&
+ cd .. &&
+ git diff module-cvs/tick module-git/tick
+
+'
+
test_done