Merge branch 'jc/denoise-rm-to-resolve'
[gitweb.git] / sha1-name.c
index 3c9fa10af8f33bae397124bf47c5f743f299ee73..2989e27b717abdabd6623299d7737e9a51641990 100644 (file)
@@ -478,7 +478,7 @@ static enum get_oid_result get_short_oid(struct repository *r,
         * or migrated from loose to packed.
         */
        if (status == MISSING_OBJECT) {
-               reprepare_packed_git(the_repository);
+               reprepare_packed_git(r);
                find_short_object_filename(&ds);
                find_short_packed_object(&ds);
                status = finish_object_disambiguation(&ds, oid);
@@ -801,7 +801,7 @@ static int get_oid_basic(struct repository *r, const char *str, int len,
        "because it will be ignored when you just specify 40-hex. These refs\n"
        "may be created by mistake. For example,\n"
        "\n"
-       "  git checkout -b $br $(git rev-parse ...)\n"
+       "  git switch -c $br $(git rev-parse ...)\n"
        "\n"
        "where \"$br\" is somehow empty and a 40-hex ref is created. Please\n"
        "examine these refs and maybe delete them. Turn this message off by\n"
@@ -1389,9 +1389,7 @@ int repo_get_oid_mb(struct repository *r,
        two = lookup_commit_reference_gently(r, &oid_tmp, 0);
        if (!two)
                return -1;
-       if (r != the_repository)
-               BUG("sorry get_merge_bases() can't take struct repository yet");
-       mbs = get_merge_bases(one, two);
+       mbs = repo_get_merge_bases(r, one, two);
        if (!mbs || mbs->next)
                st = -1;
        else {