author | Jeff King <peff@peff.net> | |
Fri, 30 Nov 2007 22:22:12 +0000 (17:22 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 30 Nov 2007 23:00:31 +0000 (15:00 -0800) | ||
commit | 67d232426b8858b31e54a9b6a5a90916690d1153 | |
tree | e22c9a837118f214ede706c44c6ef3ed766dc254 | tree | snapshot |
parent | a6214fe06eefded4f71012043f35ad805e7dd19c | commit | 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>
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>
git-cvsimport.perl | diff | blob | history | |
t/t9600-cvsimport.sh | diff | blob | history |