aboutsummaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-10-06 14:53:12 -0700
committerJunio C Hamano <gitster@pobox.com>2016-10-06 14:53:12 -0700
commitf0798e6cdbf99515391242e20f8df495a14e9c22 (patch)
treede83eeb548197f6c2493a48a617b0f47e4d39a79 /diff.c
parent578e6021c0819d7be1179e05e7ce0e6fdb2a01b7 (diff)
parent353d84c537485500989b190c5af93ad224264e2c (diff)
downloadgit-f0798e6cdbf99515391242e20f8df495a14e9c22.tar.gz
git-f0798e6cdbf99515391242e20f8df495a14e9c22.tar.xz
Merge branch 'rs/cocci'
Code clean-up with help from coccinelle tool continues. * rs/cocci: 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
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 a178ed39b..be11e4ef2 100644
--- a/diff.c
+++ b/diff.c
@@ -3109,7 +3109,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);