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>
---
Junio C Hamano <gitster@pobox.com> writes:
> We probably should do two things to resolve this.
>
> * Protect our scripts. When parsing from "git log" and any
> other Porcelain, explicitly give --no-color.
Here is my attempt -- I do not have an easy access to SVN repo
to interoperate with, so a testing by real-world users and an
Ack is appreciated. I think some fix for this issue (not
necessarily this patch) should be in 1.5.3 final.
git-svn.perl | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index 4e325b7..98218da 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);
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
| Nick Piggin | Re: [Announce] [patch] Modular Scheduler Core and Completely Fair Scheduler [CFS] |
| Greg KH | Linux 2.6.26.3 |
| Vladislav Bolkhovitin | Re: Integration of SCST in the mainstream Linux kernel |
| Greg KH | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
git: | |
| David Symonds | Re: git and binary files |
| Sam Song | Fwd: [OT] Re: Git via a proxy server? |
| Linus Torvalds | Re: [PATCH 0/6] Initial subproject support (RFC?) |
| Petr Baudis | Re: repo.or.cz wishes? |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Jeff Garzik | Re: Wasting our Freedom |
| Alexey Suslikov | OT: OpenBSD on Asus eeePC |
| ropers | Re: Real men don't attack straw men |
| David Howells | [PATCH 6/7] FS-Cache: CacheFiles: ia64: missing copy_page export [try #13] |
| Valdis.Kletnieks | Re: [RFD] Incremental fsck |
| Chris Mason | Re: [PATCH][RFC] fast file mapping for loop |
| Nikolai Joukov | Re: [ANNOUNCE] RAIF: Redundant Array of Independent Filesystems |
