[PATCH] Additional functions for the objects database
[gitweb.git] / merge-base.c
index 0b99598f305593de5d48e6cbafcbdea359349c45..ac1153bc5646cb2d515ff206b759f4a79e90273a 100644 (file)
@@ -85,11 +85,8 @@ int main(int argc, char **argv)
        rev1 = lookup_commit(rev1key);
        rev2 = lookup_commit(rev2key);
        ret = common_ancestor(rev1, rev2);
-       if (ret) {
-               printf("%s\n", sha1_to_hex(ret->object.sha1));
-               return 0;
-       } else {
+       if (!ret)
                return 1;
-       }
-       
+       printf("%s\n", sha1_to_hex(ret->object.sha1));
+       return 0;
 }