mirror of
https://github.com/git/git.git
synced 2024-11-24 10:26:17 +08:00
git-show-branch: Fix off-by-one error.
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
a935c39727
commit
79778e4696
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user