From e13f38a33ed181b937c85fd9adf6bce755f69d00 Mon Sep 17 00:00:00 2001 From: Bo Yang Date: Thu, 8 Jul 2010 23:12:34 +0800 Subject: diff.c: fix a graph output bug When --graph is in effect, the line-prefix typically has colored graph line segments and ends with reset. The color sequence "set" given to this function is for showing the metainfo part of the patch text and (1) it should not be applied to the graph lines, and (2) it will be reset at the end of line_prefix so it won't be in effect anyway. Signed-off-by: Bo Yang Signed-off-by: Junio C Hamano --- diff.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/diff.c b/diff.c index 3aa695df62..17873f3d9e 100644 --- a/diff.c +++ b/diff.c @@ -2627,8 +2627,7 @@ static void fill_metainfo(struct strbuf *msg, (!fill_mmfile(&mf, two) && diff_filespec_is_binary(two))) abbrev = 40; } - strbuf_addf(msg, "%s%sindex %s..", set, - line_prefix, + strbuf_addf(msg, "%s%sindex %s..", line_prefix, set, find_unique_abbrev(one->sha1, abbrev)); strbuf_addstr(msg, find_unique_abbrev(two->sha1, abbrev)); if (one->mode == two->mode) -- cgit v1.2.3