summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1bb28d8)
raw | patch | inline | side by side (parent: 1bb28d8)
author | Michael J Gruber <git@drmicha.warpmail.net> | |
Sun, 28 Nov 2010 19:39:45 +0000 (20:39 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 30 Nov 2010 01:08:22 +0000 (17:08 -0800) |
in preparation of the config parse patch
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-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 | patch | blob | history |
diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index 7ab7bbc9ea324021241c4f4779e66f320c7f0ed8..bf953543acb330a9b4ddc954c5d9f9453127d8a9 100755 (executable)
--- a/git-cvsimport.perl
+++ b/git-cvsimport.perl
# convert getopts specs for use by git config
sub read_repo_config {
- # Split the string between characters, unless there is a ':'
- # So "abc:de" becomes ["a", "b", "c:", "d", "e"]
+ # Split the string between characters, unless there is a ':'
+ # So "abc:de" becomes ["a", "b", "c:", "d", "e"]
my @opts = split(/ *(?!:)/, shift);
foreach my $o (@opts) {
my $key = $o;
my $arg = 'git config';
$arg .= ' --bool' if ($o !~ /:$/);
- chomp(my $tmp = `$arg --get cvsimport.$key`);
+ chomp(my $tmp = `$arg --get cvsimport.$key`);
if ($tmp && !($arg =~ /--bool/ && $tmp eq 'false')) {
- no strict 'refs';
- my $opt_name = "opt_" . $key;
- if (!$$opt_name) {
- $$opt_name = $tmp;
- }
+ no strict 'refs';
+ my $opt_name = "opt_" . $key;
+ if (!$$opt_name) {
+ $$opt_name = $tmp;
+ }
}
}
}