summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-08-12 16:47:37 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-08-12 16:47:37 (GMT)
commit0a315befa7cb3132ab2ee6caa7dccb2299b7a348 (patch)
tree21d74d49b997d990b7d5067dbf840490cbaa750a /builtin
parent57734b4e88c4d61329c74f5f4fb042f7de622966 (diff)
parent1eb47f167d65d1d305b9c196a1bb40eb96117cb1 (diff)
downloadgit-0a315befa7cb3132ab2ee6caa7dccb2299b7a348.zip
git-0a315befa7cb3132ab2ee6caa7dccb2299b7a348.tar.gz
git-0a315befa7cb3132ab2ee6caa7dccb2299b7a348.tar.bz2
Merge branch 'rs/use-strbuf-add-unique-abbrev'
A small code clean-up. * rs/use-strbuf-add-unique-abbrev: use strbuf_add_unique_abbrev() for adding short hashes
Diffstat (limited to 'builtin')
-rw-r--r--builtin/checkout.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c
index 8d852d4..4866111 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -706,8 +706,7 @@ static int add_pending_uninteresting_ref(const char *refname,
static void describe_one_orphan(struct strbuf *sb, struct commit *commit)
{
strbuf_addstr(sb, " ");
- strbuf_addstr(sb,
- find_unique_abbrev(commit->object.oid.hash, DEFAULT_ABBREV));
+ strbuf_add_unique_abbrev(sb, commit->object.oid.hash, DEFAULT_ABBREV);
strbuf_addch(sb, ' ');
if (!parse_commit(commit))
pp_commit_easy(CMIT_FMT_ONELINE, commit, sb);