git-show-branch: Fix off-by-one error.
authorJunio C Hamano <junkio@cox.net>
Sun, 23 Oct 2005 08:18:42 +0000 (01:18 -0700)
committerJunio C Hamano <junkio@cox.net>
Sun, 23 Oct 2005 08:19:48 +0000 (01:19 -0700)
Signed-off-by: Junio C Hamano <junkio@cox.net>
show-branch.c

index 8429c17..ed83645 100644 (file)
@@ -247,7 +247,7 @@ static int append_ref(const char *refname, const unsigned char *sha1)
        struct commit *commit = lookup_commit_reference_gently(sha1, 1);
        if (!commit)
                return 0;
-       if (MAX_REVS < ref_name_cnt) {
+       if (MAX_REVS <= ref_name_cnt) {
                fprintf(stderr, "warning: ignoring %s; "
                        "cannot handle more than %d refs",
                        refname, MAX_REVS);