diff options
author | Ben Peart <benpeart@microsoft.com> | 2019-01-23 15:02:01 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-01-23 13:22:48 -0800 |
commit | 8424bfd45b291a56594f0289dc6af22e900a1d88 (patch) | |
tree | 4e8e0559842cd13484b45cf2ba098bbfc74c680e /t | |
parent | checkout: add test demonstrating regression with checkout -b on initial commit (diff) | |
download | tgif-8424bfd45b291a56594f0289dc6af22e900a1d88.tar.xz |
checkout: fix regression in checkout -b on intitial checkout
When doing a 'checkout -b' do a full checkout including updating the working
tree when doing the initial checkout. As the new test involves an filesystem
access, do it later in the sequence to give chance to other cheaper tests to
leave early. This fixes the regression in behavior caused by fa655d8411
(checkout: optimize "git checkout -b <new_branch>", 2018-08-16).
Signed-off-by: Ben Peart <benpeart@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t2018-checkout-branch.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t2018-checkout-branch.sh b/t/t2018-checkout-branch.sh index 6da2d4e68f..c5014ad9a6 100755 --- a/t/t2018-checkout-branch.sh +++ b/t/t2018-checkout-branch.sh @@ -198,7 +198,7 @@ test_expect_success 'checkout -B to the current branch works' ' test_dirty_mergeable ' -test_expect_failure 'checkout -b after clone --no-checkout does a checkout of HEAD' ' +test_expect_success 'checkout -b after clone --no-checkout does a checkout of HEAD' ' git init src && test_commit -C src a && rev="$(git -C src rev-parse HEAD)" && |