summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2016-10-28 09:01:23 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-10-28 09:01:23 -0700
commitc8fd2201756f9cd10a796311a1b25d7a2ab2a3b9 (patch)
tree6654ec0ab1a53959fe62fa526445efe71deb0dfb /diff.c
parentMerge branch 'jc/diff-unique-abbrev-comments' into maint (diff)
parentuse strbuf_add_unique_abbrev() for adding short hashes, part 3 (diff)
downloadtgif-c8fd2201756f9cd10a796311a1b25d7a2ab2a3b9.tar.xz
Merge branch 'rs/cocci' into maint
Code cleanup. * rs/cocci: use strbuf_add_unique_abbrev() for adding short hashes, part 3 remove unnecessary NULL check before free(3) coccicheck: make transformation for strbuf_addf(sb, "...") more precise use strbuf_add_unique_abbrev() for adding short hashes, part 2 use strbuf_addstr() instead of strbuf_addf() with "%s", part 2 gitignore: ignore output files of coccicheck make target use strbuf_addstr() for adding constant strings to a strbuf, part 2 add coccicheck make target contrib/coccinelle: fix semantic patch for oid_to_hex_r()
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/diff.c b/diff.c
index 01e1507e74..fe6f59160f 100644
--- a/diff.c
+++ b/diff.c
@@ -3076,7 +3076,7 @@ static void fill_metainfo(struct strbuf *msg,
}
strbuf_addf(msg, "%s%sindex %s..", line_prefix, set,
find_unique_abbrev(one->oid.hash, abbrev));
- strbuf_addstr(msg, find_unique_abbrev(two->oid.hash, abbrev));
+ strbuf_add_unique_abbrev(msg, two->oid.hash, abbrev);
if (one->mode == two->mode)
strbuf_addf(msg, " %06o", one->mode);
strbuf_addf(msg, "%s\n", reset);