git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] t3203: test 'detached at' after checkout --detach
@ 2015-09-27 15:13 Matthieu Moy
  2015-09-27 15:13 ` [PATCH 2/2] status: don't say 'HEAD detached at HEAD' Matthieu Moy
  0 siblings, 1 reply; 4+ messages in thread
From: Matthieu Moy @ 2015-09-27 15:13 UTC (permalink / raw)
  To: gitster; +Cc: git, Matthieu Moy

This currently fails: the output is 'HEAD detached at HEAD'.
---
 t/t3203-branch-output.sh | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/t/t3203-branch-output.sh b/t/t3203-branch-output.sh
index f51d0f3..bf24dbf 100755
--- a/t/t3203-branch-output.sh
+++ b/t/t3203-branch-output.sh
@@ -106,6 +106,19 @@ EOF
 	test_i18ncmp expect actual
 '
 
+test_expect_failure 'git branch shows detached HEAD properly after checkout --detach' '
+	git checkout master &&
+	cat >expect <<EOF &&
+* (HEAD detached at $(git rev-parse --short HEAD^0))
+  branch-one
+  branch-two
+  master
+EOF
+	git checkout --detach &&
+	git branch >actual &&
+	test_i18ncmp expect actual
+'
+
 test_expect_success 'git branch shows detached HEAD properly after moving' '
 	cat >expect <<EOF &&
 * (HEAD detached from $(git rev-parse --short HEAD))
-- 
2.5.0.402.g8854c44

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

end of thread, other threads:[~2015-10-01 16:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-27 15:13 [PATCH 1/2] t3203: test 'detached at' after checkout --detach Matthieu Moy
2015-09-27 15:13 ` [PATCH 2/2] status: don't say 'HEAD detached at HEAD' Matthieu Moy
2015-10-01 11:13   ` Michael J Gruber
2015-10-01 16:53     ` Matthieu Moy

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).