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:
authorMatheus Tavares <matheus.bernardino@usp.br>2022-07-14 14:49:12 +0300
committerJunio C Hamano <gitster@pobox.com>2022-07-14 20:19:28 +0300
commit611c7785e8e22637e183333c54ed266e6e83e163 (patch)
tree8b4379db400b8f61570306598567e03c4eab0eb3 /t/t2080-parallel-checkout-basics.sh
parent11d14dee43794581ca3a7a93f9a081de711845d4 (diff)
checkout: fix two bugs on the final count of updated entries
At the end of `git checkout <pathspec>`, we get a message informing how many entries were updated in the working tree. However, this number can be inaccurate for two reasons: 1) Delayed entries currently get counted twice. 2) Failed entries are included in the count. The first problem happens because the counter is first incremented before inserting the entry in the delayed checkout queue, and once again when finish_delayed_checkout() calls checkout_entry(). And the second happens because the counter is incremented too early in checkout_entry(), before the entry was in fact checked out. Fix that by moving the count increment further down in the call stack and removing the duplicate increment on delayed entries. Note that we have to keep a per-entry reference for the counter (both on parallel checkout and delayed checkout) because not all entries are always accumulated at the same counter. See checkout_worktree(), at builtin/checkout.c for an example. Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t2080-parallel-checkout-basics.sh')
-rwxr-xr-xt/t2080-parallel-checkout-basics.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t2080-parallel-checkout-basics.sh b/t/t2080-parallel-checkout-basics.sh
index 7d6d26e1a4..c683e60007 100755
--- a/t/t2080-parallel-checkout-basics.sh
+++ b/t/t2080-parallel-checkout-basics.sh
@@ -230,7 +230,7 @@ test_expect_success SYMLINKS 'parallel checkout checks for symlinks in leading d
# check the final report including sequential, parallel, and delayed entries
# all at the same time. So we must have finer control of the parallel checkout
# variables.
-test_expect_failure PERL '"git checkout ." report should not include failed entries' '
+test_expect_success PERL '"git checkout ." report should not include failed entries' '
write_script rot13-filter.pl "$PERL_PATH" \
<"$TEST_DIRECTORY"/t0021/rot13-filter.pl &&