[PATCH 1/2] t3203: test 'detached at' after checkout --detach

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]