From eeebd8d8c5ab63494abe200b30a840aa99ee7412 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 31 Aug 2007 14:29:49 -0700 Subject: [PATCH] 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 Tested-by: Johannes Schindelin Acked-by: Eric Wong --- git-svn.perl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git-svn.perl b/git-svn.perl index 4e325b771..98218dabd 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -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>) { @@ -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); -- 2.30.2