summaryrefslogtreecommitdiff
path: root/builtin/checkout.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-09-09 04:35:59 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-09-09 04:36:00 (GMT)
commit5e469ab66c86d5178aae71cacf9f55c3b378de03 (patch)
tree3329cf6ec9eececfc8f60082f2859f30b25f8c20 /builtin/checkout.c
parentf14883b972f3d6b104c4d141fc3de34af9ba0b24 (diff)
parent1eb47f167d65d1d305b9c196a1bb40eb96117cb1 (diff)
downloadgit-5e469ab66c86d5178aae71cacf9f55c3b378de03.zip
git-5e469ab66c86d5178aae71cacf9f55c3b378de03.tar.gz
git-5e469ab66c86d5178aae71cacf9f55c3b378de03.tar.bz2
Merge branch 'rs/use-strbuf-add-unique-abbrev' into maint
A small code clean-up. * rs/use-strbuf-add-unique-abbrev: use strbuf_add_unique_abbrev() for adding short hashes
Diffstat (limited to 'builtin/checkout.c')
-rw-r--r--builtin/checkout.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c
index 91bafda..d3b2968 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -704,8 +704,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);