Skip to content

Commit eeebd8d

Browse files
committed
git-svn: Protect against "diff.color = true".
If the configuration of the user has "diff.color = true", the output from "log" we invoke internally added color codes, which broke the parser. Signed-off-by: Junio C Hamano <gitster@pobox.com> Tested-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Acked-by: Eric Wong <normalperson@yhbt.net>
1 parent f95eef1 commit eeebd8d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

git-svn.perl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -807,7 +807,7 @@ sub cmt_metadata {
807807

808808
sub working_head_info {
809809
my ($head, $refs) = @_;
810-
my ($fh, $ctx) = command_output_pipe('log', $head);
810+
my ($fh, $ctx) = command_output_pipe('log', '--no-color', $head);
811811
my $hash;
812812
my %max;
813813
while (<$fh>) {
@@ -2072,7 +2072,7 @@ sub rebuild {
20722072
return;
20732073
}
20742074
print "Rebuilding $db_path ...\n";
2075-
my ($log, $ctx) = command_output_pipe("log", $self->refname);
2075+
my ($log, $ctx) = command_output_pipe("log", '--no-color', $self->refname);
20762076
my $latest;
20772077
my $full_url = $self->full_url;
20782078
remove_username($full_url);

0 commit comments

Comments
 (0)