]> git.ipfire.org Git - thirdparty/git.git/commit
checkout: fix regression in checkout -b on intitial checkout
authorBen Peart <benpeart@microsoft.com>
Wed, 23 Jan 2019 20:02:01 +0000 (15:02 -0500)
committerJunio C Hamano <gitster@pobox.com>
Wed, 23 Jan 2019 21:22:48 +0000 (13:22 -0800)
commit8424bfd45b291a56594f0289dc6af22e900a1d88
tree4e8e0559842cd13484b45cf2ba098bbfc74c680e
parent91e3d7ca9b0194575c1fdbb82b74bef4eb8357a1
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>
builtin/checkout.c
t/t2018-checkout-branch.sh