diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-10-17 13:25:21 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-10-17 13:25:21 -0700 |
commit | 69e6544998892a2bd3c785cd238c786da40cf6a3 (patch) | |
tree | 5226289723f43db878429658b27a89b4ad23ee57 /merge-recursive.c | |
parent | 9424bf27079a1262e42a2330283f7ab6c805267a (diff) | |
parent | a94bb683970a111b467a36590ca36e52754ad504 (diff) | |
download | git-69e6544998892a2bd3c785cd238c786da40cf6a3.tar.gz |
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.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/merge-recursive.c b/merge-recursive.c index 5200d5ccf8..9041c2f149 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 { |