@matheusbsbs / matheus-bagliano / commits / e13f38a33e
Fork 0

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 <struggleyb.nku@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Bo Yang committed Jul 8, 2010 at 23:12 UTC e13f38a33ed181b937c85fd9adf6bce755f69d00
1 file changed +1 -2
diff.c
+1 -2
@@ -2627,8 +2627,7 @@ static void fill_metainfo(struct strbuf *msg,
2627 (!fill_mmfile(&mf, two) && diff_filespec_is_binary(two)))
2628 abbrev = 40;
2629 }
2630 - strbuf_addf(msg, "%s%sindex %s..", set,
2631 - line_prefix,
2630 + strbuf_addf(msg, "%s%sindex %s..", line_prefix, set,
2631 find_unique_abbrev(one->sha1, abbrev));
2632 strbuf_addstr(msg, find_unique_abbrev(two->sha1, abbrev));
2633 if (one->mode == two->mode)