git-am: Don't accept an mbox on stdin of we already have a .dotest directory
[gitweb.git] / builtin-show-branch.c
index 3d240ca435e3079530dd3515ce78bd20858e3a6f..82f75b72dea1a5e6c620003d5c0c4c414dfe42e3 100644 (file)
@@ -89,6 +89,8 @@ static int name_first_parent_chain(struct commit *c)
                        name_parent(c, p);
                        i++;
                }
+               else
+                       break;
                c = p;
        }
        return i;