use strbuf_add_unique_abbrev() for adding short hashes
[gitweb.git] / builtin / checkout.c
index c3486bdec364fde395cf3523b778ec4dc9c3223a..fa08b73c0f57d0453fe7054586d12012d4267168 100644 (file)
@@ -703,8 +703,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);