diff --git a/builtin-show-branch.c b/builtin-show-branch.c index 3d240ca435..82f75b72de 100644 --- a/builtin-show-branch.c +++ b/builtin-show-branch.c @@ -89,6 +89,8 @@ static int name_first_parent_chain(struct commit *c) name_parent(c, p); i++; } + else + break; c = p; } return i;