From: Junio C Hamano Date: Sun, 23 Oct 2005 08:18:42 +0000 (-0700) Subject: git-show-branch: Fix off-by-one error. X-Git-Tag: v0.99.8g~1^2 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=79778e4696502884cdf2b12348ad7300b64fcf6e;p=git.git git-show-branch: Fix off-by-one error. Signed-off-by: Junio C Hamano --- diff --git a/show-branch.c b/show-branch.c index 8429c171..ed83645e 100644 --- a/show-branch.c +++ b/show-branch.c @@ -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);