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>
This commit is contained in:
Junio C Hamano 2007-08-31 14:29:49 -07:00
Родитель f95eef15f2
Коммит eeebd8d8c5
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -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);