[PATCHv2 07/10] t3203: Add testcase for fix in 1603ade81352a526ccb206f41ff81ecbc855df2d
- From
Johan Herland <johan@herland.net>
- Date
- May 11, 2013, 16:21 UTC
- Message-ID
- <1368289280-30337-8-git-send-email-johan@herland.net>
- In-Reply-To
- <1368289280-30337-1-git-send-email-johan@herland.net>
This adds a testcase for some behavior that I very nearly broke while refactoring some stuff in builtin/branch.c.
Signed-off-by: Johan Herland <johan@herland.net> --- t/t3203-branch-output.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
diff --git a/t/t3203-branch-output.sh b/t/t3203-branch-output.sh index ba4f98e..c312d3a 100755 --- a/t/t3203-branch-output.sh +++ b/t/t3203-branch-output.sh @@ -106,4 +106,19 @@ EOF test_i18ncmp expect actual ' +test_expect_success 'git branch -a --merged handles broken refs gracefully' ' + cat >expect <<EOF && + branch-one + branch-two +* master + remotes/origin/HEAD -> origin/branch-one + remotes/origin/branch-one + remotes/origin/branch-two +EOF + git checkout master && + echo "broken ref" > .git/refs/heads/broken && + test_must_fail git branch -a --merged >actual && + test_cmp expect actual +' + test_done
-- 1.8.1.3.704.g33f7d4f