use strbuf_add_unique_abbrev() for adding short hashes
[gitweb.git] / builtin / checkout.c
index 3398c61e9a64ab686bf59fb027277f3de578b5fb..fa08b73c0f57d0453fe7054586d12012d4267168 100644 (file)
@@ -548,7 +548,7 @@ static int merge_working_tree(const struct checkout_opts *opts,
                         * entries in the index.
                         */
 
-                       add_files_to_cache(NULL, NULL, 0);
+                       add_files_to_cache(NULL, NULL, 0, 0);
                        /*
                         * NEEDSWORK: carrying over local changes
                         * when branches have different end-of-line
@@ -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);