sha1-name.c: remove implicit dependency on the_index
[gitweb.git] / builtin / rev-parse.c
index 455f62246d69ad0468ffde58e568732bd3339c63..910a71ed8b7997a4d1317f9a2bf048bc2617040a 100644 (file)
@@ -765,6 +765,7 @@ int cmd_rev_parse(int argc, const char **argv, const char *prefix)
                        }
                        if (!strcmp(arg, "--all")) {
                                for_each_ref(show_reference, NULL);
+                               clear_ref_exclusion(&ref_excludes);
                                continue;
                        }
                        if (skip_prefix(arg, "--disambiguate=", &arg)) {
@@ -932,7 +933,8 @@ int cmd_rev_parse(int argc, const char **argv, const char *prefix)
                        name++;
                        type = REVERSED;
                }
-               if (!get_oid_with_context(name, flags, &oid, &unused)) {
+               if (!get_oid_with_context(the_repository, name,
+                                         flags, &oid, &unused)) {
                        if (verify)
                                revs_count++;
                        else