Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-10-16 01:43:42 +0300
committerJunio C Hamano <gitster@pobox.com>2015-10-16 01:43:42 +0300
commita394b39726f92c408fa494fa5357667b21466e93 (patch)
tree0c615e18e0406143ad9c3ad54408f2a0ca60ddfc /t/t3203-branch-output.sh
parent50a5e697b47a8625ed5b4d8a7f475a5741555566 (diff)
parent0eb8548f45cc51bff9b70f551f4c472af353a814 (diff)
Merge branch 'mm/detach-at-HEAD-reflog'
After "git checkout --detach", "git status" reported a fairly useless "HEAD detached at HEAD", instead of saying at which exact commit. * mm/detach-at-HEAD-reflog: status: don't say 'HEAD detached at HEAD' t3203: test 'detached at' after checkout --detach
Diffstat (limited to 't/t3203-branch-output.sh')
-rwxr-xr-xt/t3203-branch-output.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/t/t3203-branch-output.sh b/t/t3203-branch-output.sh
index f1ae5ff662..9454423ca0 100755
--- a/t/t3203-branch-output.sh
+++ b/t/t3203-branch-output.sh
@@ -106,6 +106,19 @@ EOF
test_i18ncmp expect actual
'
+test_expect_success '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))