]> git.ipfire.org Git - thirdparty/git.git/commit - git-cvsimport.perl
cvsimport: handle the parsing of uppercase config options
authorMichael J Gruber <git@drmicha.warpmail.net>
Wed, 29 Dec 2010 21:55:34 +0000 (22:55 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 4 Jan 2011 21:31:03 +0000 (13:31 -0800)
commit60d5985dab5d3c5a283f060414b903778adfd09a
tree7c494f82042a233769d40a62b0fac9aa396a3868
parent549ad6d2f3a7090d6f73f8ebacd5d1db7a0cf90f
cvsimport: handle the parsing of uppercase config options

The current code leads to

  fatal: bad config value for 'cvsimport.r' in .git/config

for a standard use case with cvsimport.r set.

cvsimport sets internal variables by checking the config for each
possible command line option. The problem is that config items are case
insensitive, so config.r and config.R are the same. The ugly error is
due to that fact that cvsimport expects a bool for -R (and thus
config.R) but a remote name for -r (and thus config.r).

Fix this by making cvsimport expect long names for uppercase options.

config options for cvsimport have been undocumented so far, though
present in the code and advertised in several tutorials. So one may read
"enhance" for "fix". Similarly, the names for the options are
"documented" in the code, waitiing for their lowercase equivalents to be
transformed into long config options, as well.

Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-cvsimport.perl
t/t9600-cvsimport.sh