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;
}