Fix 'git-show-branch --list <head>'
authorJunio C Hamano <junkio@cox.net>
Sun, 11 Sep 2005 01:24:46 +0000 (18:24 -0700)
committerJunio C Hamano <junkio@cox.net>
Sun, 11 Sep 2005 01:27:20 +0000 (18:27 -0700)
It mistakenly failed to output anything when given a single head.

Signed-off-by: Junio C Hamano <junkio@cox.net>
show-branch.c

index c117c53..262acf5 100644 (file)
@@ -427,7 +427,7 @@ int main(int ac, char **av)
                return show_independent(rev, num_rev, ref_name, rev_mask);
 
        /* Show list; --more=-1 means list-only */
-       if (1 < num_rev) {
+       if (1 < num_rev || extra < 0) {
                for (i = 0; i < num_rev; i++) {
                        int j;
                        int is_head = rev_is_head(head_path,