diff options
Diffstat (limited to 'merge-base.c')
-rw-r--r-- | merge-base.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/merge-base.c b/merge-base.c index 0b99598f30..ac1153bc56 100644 --- a/merge-base.c +++ b/merge-base.c @@ -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; } |