summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorMatheus Tavares <matheus.bernardino@usp.br>2022-07-14 11:49:10 (GMT)
committerJunio C Hamano <gitster@pobox.com>2022-07-14 17:19:27 (GMT)
commited602c3f448c2681b16245d4a489342a2db89855 (patch)
treeeae0db7b247b2c4f2647e16a0676b775854fb492 /t
parente4a4b31577c7419497ac30cebe30d755b97752c5 (diff)
downloadgit-ed602c3f448c2681b16245d4a489342a2db89855.zip
git-ed602c3f448c2681b16245d4a489342a2db89855.tar.gz
git-ed602c3f448c2681b16245d4a489342a2db89855.tar.bz2
checkout: document bug where delayed checkout counts entries twice
At the end of a `git checkout <pathspec>` operation, git reports how many paths were checked out with a message like "Updated N paths from the index". However, entries that end up on the delayed checkout queue (as requested by a long-running process filter) get counted twice, producing a wrong number in the final report. We will fix this bug in an upcoming commit. For now, only document/demonstrate it with a test_expect_failure. Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t0021-conversion.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh
index bad37ab..00df9b5 100755
--- a/t/t0021-conversion.sh
+++ b/t/t0021-conversion.sh
@@ -1132,4 +1132,26 @@ do
'
done
+test_expect_failure PERL 'delayed checkout correctly reports the number of updated entries' '
+ rm -rf repo &&
+ git init repo &&
+ (
+ cd repo &&
+ git config filter.delay.process "../rot13-filter.pl delayed.log clean smudge delay" &&
+ git config filter.delay.required true &&
+
+ echo "*.a filter=delay" >.gitattributes &&
+ echo a >test-delay10.a &&
+ echo a >test-delay11.a &&
+ git add . &&
+ git commit -m files &&
+
+ rm *.a &&
+ git checkout . 2>err &&
+ grep "IN: smudge test-delay10.a .* \\[DELAYED\\]" delayed.log &&
+ grep "IN: smudge test-delay11.a .* \\[DELAYED\\]" delayed.log &&
+ grep "Updated 2 paths from the index" err
+ )
+'
+
test_done