fetching submodules: respect `submodule.fetchJobs` config option
[gitweb.git] / builtin / merge-base.c
index 0ecde8da30615996f54563014e4774b67812c531..a8911626c2ca9e178c8f4373d544c670afdb6aea 100644 (file)
@@ -10,13 +10,13 @@ static int show_merge_base(struct commit **rev, int rev_nr, int show_all)
 {
        struct commit_list *result;
 
-       result = get_merge_bases_many(rev[0], rev_nr - 1, rev + 1, 0);
+       result = get_merge_bases_many_dirty(rev[0], rev_nr - 1, rev + 1);
 
        if (!result)
                return 1;
 
        while (result) {
-               printf("%s\n", sha1_to_hex(result->item->object.sha1));
+               printf("%s\n", oid_to_hex(&result->item->object.oid));
                if (!show_all)
                        return 0;
                result = result->next;
@@ -26,8 +26,8 @@ static int show_merge_base(struct commit **rev, int rev_nr, int show_all)
 }
 
 static const char * const merge_base_usage[] = {
-       N_("git merge-base [-a|--all] <commit> <commit>..."),
-       N_("git merge-base [-a|--all] --octopus <commit>..."),
+       N_("git merge-base [-a | --all] <commit> <commit>..."),
+       N_("git merge-base [-a | --all] --octopus <commit>..."),
        N_("git merge-base --independent <commit>..."),
        N_("git merge-base --is-ancestor <commit> <commit>"),
        N_("git merge-base --fork-point <ref> [<commit>]"),
@@ -62,7 +62,7 @@ static int handle_independent(int count, const char **args)
                return 1;
 
        while (result) {
-               printf("%s\n", sha1_to_hex(result->item->object.sha1));
+               printf("%s\n", oid_to_hex(&result->item->object.oid));
                result = result->next;
        }
        return 0;
@@ -83,7 +83,7 @@ static int handle_octopus(int count, const char **args, int show_all)
                return 1;
 
        while (result) {
-               printf("%s\n", sha1_to_hex(result->item->object.sha1));
+               printf("%s\n", oid_to_hex(&result->item->object.oid));
                if (!show_all)
                        return 0;
                result = result->next;
@@ -176,7 +176,7 @@ static int handle_fork_point(int argc, const char **argv)
        for (i = 0; i < revs.nr; i++)
                revs.commit[i]->object.flags &= ~TMP_MARK;
 
-       bases = get_merge_bases_many(derived, revs.nr, revs.commit, 0);
+       bases = get_merge_bases_many_dirty(derived, revs.nr, revs.commit);
 
        /*
         * There should be one and only one merge base, when we found
@@ -196,7 +196,7 @@ static int handle_fork_point(int argc, const char **argv)
                goto cleanup_return;
        }
 
-       printf("%s\n", sha1_to_hex(bases->item->object.sha1));
+       printf("%s\n", oid_to_hex(&bases->item->object.oid));
 
 cleanup_return:
        free_commit_list(bases);