[PATCH] Update tags to record who made them
[git.git] / merge-base.c
index 2c40881..12ebb95 100644 (file)
@@ -15,7 +15,7 @@ static struct commit *process_list(struct commit_list **list_p, int this_mark,
        return NULL;
 }
 
-struct commit *common_ancestor(struct commit *rev1, struct commit *rev2)
+static struct commit *common_ancestor(struct commit *rev1, struct commit *rev2)
 {
        struct commit_list *rev1list = NULL;
        struct commit_list *rev2list = NULL;
@@ -58,12 +58,12 @@ int main(int argc, char **argv)
        unsigned char rev1key[20], rev2key[20];
 
        if (argc != 3 ||
-           get_sha1_hex(argv[1], rev1key) ||
-           get_sha1_hex(argv[2], rev2key)) {
-               usage("merge-base <commit-id> <commit-id>");
+           get_sha1(argv[1], rev1key) ||
+           get_sha1(argv[2], rev2key)) {
+               usage("git-merge-base <commit-id> <commit-id>");
        }
-       rev1 = lookup_commit(rev1key);
-       rev2 = lookup_commit(rev2key);
+       rev1 = lookup_commit_reference(rev1key);
+       rev2 = lookup_commit_reference(rev2key);
        ret = common_ancestor(rev1, rev2);
        if (!ret)
                return 1;