aboutsummaryrefslogtreecommitdiff
path: root/merge-recursive.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-10-17 13:25:21 -0700
committerJunio C Hamano <gitster@pobox.com>2016-10-17 13:25:21 -0700
commit69e6544998892a2bd3c785cd238c786da40cf6a3 (patch)
tree5226289723f43db878429658b27a89b4ad23ee57 /merge-recursive.c
parent9424bf27079a1262e42a2330283f7ab6c805267a (diff)
parenta94bb683970a111b467a36590ca36e52754ad504 (diff)
downloadgit-69e6544998892a2bd3c785cd238c786da40cf6a3.tar.gz
git-69e6544998892a2bd3c785cd238c786da40cf6a3.tar.xz
Merge branch 'rs/cocci'
Code cleanup. * rs/cocci: use strbuf_add_unique_abbrev() for adding short hashes, part 3 remove unnecessary NULL check before free(3)
Diffstat (limited to 'merge-recursive.c')
-rw-r--r--merge-recursive.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/merge-recursive.c b/merge-recursive.c
index 5200d5ccf..9041c2f14 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -202,9 +202,9 @@ static void output_commit_title(struct merge_options *o, struct commit *commit)
strbuf_addf(&o->obuf, "virtual %s\n",
merge_remote_util(commit)->name);
else {
- strbuf_addf(&o->obuf, "%s ",
- find_unique_abbrev(commit->object.oid.hash,
- DEFAULT_ABBREV));
+ strbuf_add_unique_abbrev(&o->obuf, commit->object.oid.hash,
+ DEFAULT_ABBREV);
+ strbuf_addch(&o->obuf, ' ');
if (parse_commit(commit) != 0)
strbuf_addstr(&o->obuf, _("(bad commit)\n"));
else {