pack-check.c: remove the_repository references
[gitweb.git] / builtin / rev-parse.c
index 4f49e96bfd0166aeb6f9875a688ff0dd83d631b5..455f62246d69ad0468ffde58e568732bd3339c63 100644 (file)
@@ -14,6 +14,7 @@
 #include "revision.h"
 #include "split-index.h"
 #include "submodule.h"
+#include "commit-reach.h"
 
 #define DO_REVS                1
 #define DO_NOREV       2
@@ -280,8 +281,8 @@ static int try_difference(const char *arg)
                if (symmetric) {
                        struct commit_list *exclude;
                        struct commit *a, *b;
-                       a = lookup_commit_reference(&start_oid);
-                       b = lookup_commit_reference(&end_oid);
+                       a = lookup_commit_reference(the_repository, &start_oid);
+                       b = lookup_commit_reference(the_repository, &end_oid);
                        if (!a || !b) {
                                *dotdot = '.';
                                return 0;
@@ -333,7 +334,7 @@ static int try_parent_shorthands(const char *arg)
 
        *dotdot = 0;
        if (get_oid_committish(arg, &oid) ||
-           !(commit = lookup_commit_reference(&oid))) {
+           !(commit = lookup_commit_reference(the_repository, &oid))) {
                *dotdot = '^';
                return 0;
        }
@@ -883,7 +884,8 @@ int cmd_rev_parse(int argc, const char **argv, const char *prefix)
                                continue;
                        }
                        if (!strcmp(arg, "--is-shallow-repository")) {
-                               printf("%s\n", is_repository_shallow() ? "true"
+                               printf("%s\n",
+                                               is_repository_shallow(the_repository) ? "true"
                                                : "false");
                                continue;
                        }