worktree: rename is_worktree_locked to worktree_lock_reason
[gitweb.git] / builtin / merge-base.c
index bbead6f33e5c5449da3ff02b98b7c2ab993a54b7..1c920990701381452da910e4cee66be5e6fde5a0 100644 (file)
@@ -7,6 +7,7 @@
 #include "revision.h"
 #include "parse-options.h"
 #include "repository.h"
+#include "commit-reach.h"
 
 static int show_merge_base(struct commit **rev, int rev_nr, int show_all)
 {
@@ -124,7 +125,7 @@ static void add_one_commit(struct object_id *oid, struct rev_collect *revs)
        if (is_null_oid(oid))
                return;
 
-       commit = lookup_commit(oid);
+       commit = lookup_commit(the_repository, oid);
        if (!commit ||
            (commit->object.flags & TMP_MARK) ||
            parse_commit(commit))