From: Matthieu Moy <Matthieu.Moy@imag.fr>
To: gitster@pobox.com
Cc: git@vger.kernel.org, Matthieu Moy <Matthieu.Moy@imag.fr>
Subject: [PATCH 1/2] t3203: test 'detached at' after checkout --detach
Date: Sun, 27 Sep 2015 17:13:41 +0200 [thread overview]
Message-ID: <1443366822-1753-1-git-send-email-Matthieu.Moy@imag.fr> (raw)
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
next reply other threads:[~2015-09-27 15:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-27 15:13 Matthieu Moy [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1443366822-1753-1-git-send-email-Matthieu.Moy@imag.fr \
--to=matthieu.moy@imag.fr \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).