git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] t1402: check to delete broken refs
@ 2014-11-25 22:56 Stefan Beller
  2014-11-26  0:35 ` Jonathan Nieder
  2014-11-26  5:05 ` [PATCH] t1402: check to " Torsten Bögershausen
  0 siblings, 2 replies; 8+ messages in thread
From: Stefan Beller @ 2014-11-25 22:56 UTC (permalink / raw)
  To: mhagger, gitster, git; +Cc: Ronnie Sahlberg, Stefan Beller

From: Ronnie Sahlberg <sahlberg@google.com>

Signed-off-by: Ronnie Sahlberg <sahlberg@google.com>
Signed-off-by: Stefan Beller <sbeller@google.com>
---
 
 This was also part of the ongoing series from Ronnie.
 But I think the patch in this form is rather independant, 
 documenting the current state of "git branch -d", so it's 
 fine to have it in now.

 t/t1402-check-ref-format.sh | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/t/t1402-check-ref-format.sh b/t/t1402-check-ref-format.sh
index e5dc62e..08af156 100755
--- a/t/t1402-check-ref-format.sh
+++ b/t/t1402-check-ref-format.sh
@@ -197,4 +197,12 @@ invalid_ref_normalized 'heads///foo.lock'
 invalid_ref_normalized 'foo.lock/bar'
 invalid_ref_normalized 'foo.lock///bar'
 
+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_done
-- 
2.2.0.rc3

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-11-26 18:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-25 22:56 [PATCH] t1402: check to delete broken refs Stefan Beller
2014-11-26  0:35 ` Jonathan Nieder
2014-11-26  0:42   ` Stefan Beller
2014-11-26  0:59     ` [PATCHv2] branch -d: test if we can " Stefan Beller
2014-11-26  8:49       ` Michael Haggerty
2014-11-26 18:43         ` Junio C Hamano
2014-11-26  5:05 ` [PATCH] t1402: check to " Torsten Bögershausen
2014-11-26 18:37   ` [PATCHv3] branch -d: test if we can " Stefan Beller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).