Merge branch 'rs/wt-status-cleanup'
[gitweb.git] / builtin / merge-base.c
index cfe2a796f85ecf8dfbbb35d3232893929670b492..6dbd167d3b0874cd966b4590951a12d01f8f6aeb 100644 (file)
@@ -1,5 +1,6 @@
 #include "builtin.h"
 #include "cache.h"
+#include "config.h"
 #include "commit.h"
 #include "refs.h"
 #include "diff.h"
@@ -41,7 +42,7 @@ static struct commit *get_commit_reference(const char *arg)
 
        if (get_oid(arg, &revkey))
                die("Not a valid object name %s", arg);
-       r = lookup_commit_reference(revkey.hash);
+       r = lookup_commit_reference(&revkey);
        if (!r)
                die("Not a valid commit name %s", arg);
 
@@ -120,7 +121,7 @@ static void add_one_commit(struct object_id *oid, struct rev_collect *revs)
        if (is_null_oid(oid))
                return;
 
-       commit = lookup_commit(oid->hash);
+       commit = lookup_commit(oid);
        if (!commit ||
            (commit->object.flags & TMP_MARK) ||
            parse_commit(commit))
@@ -132,7 +133,7 @@ static void add_one_commit(struct object_id *oid, struct rev_collect *revs)
 }
 
 static int collect_one_reflog_ent(struct object_id *ooid, struct object_id *noid,
-                                 const char *ident, unsigned long timestamp,
+                                 const char *ident, timestamp_t timestamp,
                                  int tz, const char *message, void *cbdata)
 {
        struct rev_collect *revs = cbdata;
@@ -168,7 +169,7 @@ static int handle_fork_point(int argc, const char **argv)
        if (get_oid(commitname, &oid))
                die("Not a valid object name: '%s'", commitname);
 
-       derived = lookup_commit_reference(oid.hash);
+       derived = lookup_commit_reference(&oid);
        memset(&revs, 0, sizeof(revs));
        revs.initial = 1;
        for_each_reflog_ent(refname, collect_one_reflog_ent, &revs);