Skip to content

Commit ed602c3

Browse files
matheustavaresgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e4a4b31 commit ed602c3

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

t/t0021-conversion.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,4 +1132,26 @@ do
11321132
'
11331133
done
11341134

1135+
test_expect_failure PERL 'delayed checkout correctly reports the number of updated entries' '
1136+
rm -rf repo &&
1137+
git init repo &&
1138+
(
1139+
cd repo &&
1140+
git config filter.delay.process "../rot13-filter.pl delayed.log clean smudge delay" &&
1141+
git config filter.delay.required true &&
1142+
1143+
echo "*.a filter=delay" >.gitattributes &&
1144+
echo a >test-delay10.a &&
1145+
echo a >test-delay11.a &&
1146+
git add . &&
1147+
git commit -m files &&
1148+
1149+
rm *.a &&
1150+
git checkout . 2>err &&
1151+
grep "IN: smudge test-delay10.a .* \\[DELAYED\\]" delayed.log &&
1152+
grep "IN: smudge test-delay11.a .* \\[DELAYED\\]" delayed.log &&
1153+
grep "Updated 2 paths from the index" err
1154+
)
1155+
'
1156+
11351157
test_done

0 commit comments

Comments
 (0)