From: Stefan Beller Date: Wed, 26 Nov 2014 00:59:25 GMT Subject: [PATCHv2] branch -d: test if we can delete broken refs Message-ID: <1416963565-32318-1-git-send-email-sbeller@google.com> In-Reply-To: From: Ronnie Sahlberg Signed-off-by: Ronnie Sahlberg Signed-off-by: Stefan Beller --- Changes v1->v2 * relocated the test from t1402 to t3200 * reword the commit message title to fit in with similar commits touching t/t3200-branch.sh t/t3200-branch.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh index 432921b..fa7d7bd 100755 --- a/t/t3200-branch.sh +++ b/t/t3200-branch.sh @@ -163,6 +163,14 @@ test_expect_success 'git branch --list -d t should fail' ' test_path_is_missing .git/refs/heads/t ' +test_expect_failure 'git branch -d can delete ref with broken sha1' ' + echo "pointing nowhere" > .git/refs/heads/brokensha1 && + test_when_finished "rm -f .git/refs/heads/brokensha1" && + git branch -d brokensha1 && + git branch >output && + ! grep -e "brokensha1" output +' + test_expect_success 'git branch --column' ' COLUMNS=81 git branch --column=column >actual && cat >expected <<\EOF && -- 2.2.0.rc3