Skip to content

Commit

Permalink
contrib/git-svn: ensure repo-config returns a value before using it
Browse files Browse the repository at this point in the history
fetching from repos without an authors-file defined was broken.

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 40e907b commit 5941a9e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions contrib/git-svn/git-svn.perl
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,13 @@
$arg .= ' --bool' if ($o !~ /=[sfi]$/);
$arg .= " svn.$key"; # $key only matches [a-z\-], always shell-safe
if (ref $v eq 'ARRAY') {
chomp(@$v = `$arg`);
chomp(my @tmp = `$arg`);
@$v = @tmp if @tmp;
} else {
chomp($$v = `$arg`);
$$v = 0 if $$v eq 'false';
chomp(my $tmp = `$arg`);
if ($tmp && !($arg =~ / --bool / && $tmp eq 'false')) {
$$v = $tmp;
}
}
}

Expand Down

0 comments on commit 5941a9e

Please sign in to comment.