Skip to content

Commit

Permalink
git-svn: Protect against "diff.color = true".
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Sep 1, 2007
1 parent f95eef1 commit eeebd8d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions git-svn.perl
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ sub cmt_metadata {

sub working_head_info {
my ($head, $refs) = @_;
my ($fh, $ctx) = command_output_pipe('log', $head);
my ($fh, $ctx) = command_output_pipe('log', '--no-color', $head);
my $hash;
my %max;
while (<$fh>) {
Expand Down Expand Up @@ -2072,7 +2072,7 @@ sub rebuild {
return;
}
print "Rebuilding $db_path ...\n";
my ($log, $ctx) = command_output_pipe("log", $self->refname);
my ($log, $ctx) = command_output_pipe("log", '--no-color', $self->refname);
my $latest;
my $full_url = $self->full_url;
remove_username($full_url);
Expand Down

0 comments on commit eeebd8d

Please sign in to comment.