Skip to content

Commit

Permalink
contrib/git-svn: handle array values correctly
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Eric Wong authored and Junio C Hamano committed Apr 4, 2006
1 parent 5f2f424 commit fc9957b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions contrib/git-svn/git-svn.perl
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,11 @@
my $arg = 'git-repo-config';
$arg .= ' --int' if ($o =~ /=i$/);
$arg .= ' --bool' if ($o !~ /=[sfi]$/);
$arg .= " svn.$key"; # $key only matches [a-z\-], always shell-safe
if (ref $v eq 'ARRAY') {
chomp(my @tmp = `$arg`);
chomp(my @tmp = `$arg --get-all svn.$key`);
@$v = @tmp if @tmp;
} else {
chomp(my $tmp = `$arg`);
chomp(my $tmp = `$arg --get svn.$key`);
if ($tmp && !($arg =~ / --bool / && $tmp eq 'false')) {
$$v = $tmp;
}
Expand Down

0 comments on commit fc9957b

Please sign in to comment.