summaryrefslogtreecommitdiff
path: root/t/t2020-checkout-detach.sh
diff options
context:
space:
mode:
authorJohannes Sixt <j6t@kdbg.org>2012-05-04 18:14:48 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-05-04 19:42:27 (GMT)
commit5d8863954f077d2c262d5cc4fc669947ff23d6d5 (patch)
tree56aaf37abe80507c48f69e60fac116d46355b05a /t/t2020-checkout-detach.sh
parentf94920993a0a1ba7916618e2ab458d5d4fb21e94 (diff)
downloadgit-5d8863954f077d2c262d5cc4fc669947ff23d6d5.zip
git-5d8863954f077d2c262d5cc4fc669947ff23d6d5.tar.gz
git-5d8863954f077d2c262d5cc4fc669947ff23d6d5.tar.bz2
checkout (detached): truncate list of orphaned commits at the new HEAD
When git checkout switches from a detached HEAD to any other commit, then all orphaned commits were listed in a warning: Warning: you are leaving 2 commits behind...: a5e5396 another fixup 6aa1af6 fixup foo But if the new commit is actually one from this list (6aa1af6 in this example), then the list in the warning can be truncated at the new HEAD, because history beginning at HEAD is not "left behind". This makes it so. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t2020-checkout-detach.sh')
-rwxr-xr-xt/t2020-checkout-detach.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t2020-checkout-detach.sh b/t/t2020-checkout-detach.sh
index 202ca90..f63333b 100755
--- a/t/t2020-checkout-detach.sh
+++ b/t/t2020-checkout-detach.sh
@@ -126,7 +126,7 @@ test_expect_success 'checkout warns orphaning 1 of 2 commits' '
'
test_expect_success 'checkout warns orphaning 1 of 2 commits: output' '
- check_orphan_warning stderr "2 commits"
+ check_orphan_warning stderr "1 commit"
'
test_expect_success 'checkout does not warn leaving ref tip' '