cvsimport: partial whitespace cleanup
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>
This commit is contained in:

committed by
Junio C Hamano

parent
1bb28d87e1
commit
549ad6d2f3
@ -90,8 +90,8 @@ sub write_author_info($) {
|
|||||||
|
|
||||||
# convert getopts specs for use by git config
|
# convert getopts specs for use by git config
|
||||||
sub read_repo_config {
|
sub read_repo_config {
|
||||||
# Split the string between characters, unless there is a ':'
|
# Split the string between characters, unless there is a ':'
|
||||||
# So "abc:de" becomes ["a", "b", "c:", "d", "e"]
|
# So "abc:de" becomes ["a", "b", "c:", "d", "e"]
|
||||||
my @opts = split(/ *(?!:)/, shift);
|
my @opts = split(/ *(?!:)/, shift);
|
||||||
foreach my $o (@opts) {
|
foreach my $o (@opts) {
|
||||||
my $key = $o;
|
my $key = $o;
|
||||||
@ -99,13 +99,13 @@ sub read_repo_config {
|
|||||||
my $arg = 'git config';
|
my $arg = 'git config';
|
||||||
$arg .= ' --bool' if ($o !~ /:$/);
|
$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')) {
|
if ($tmp && !($arg =~ /--bool/ && $tmp eq 'false')) {
|
||||||
no strict 'refs';
|
no strict 'refs';
|
||||||
my $opt_name = "opt_" . $key;
|
my $opt_name = "opt_" . $key;
|
||||||
if (!$$opt_name) {
|
if (!$$opt_name) {
|
||||||
$$opt_name = $tmp;
|
$$opt_name = $tmp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user