Skip to content

Commit 293194c

Browse files
jonathantanmygitster
authored andcommitted
t4067: make rename detection test output raw diff
95acf11 ("diff: restrict when prefetching occurs", 2020-04-07) taught diff to prefetch blobs in a more limited set of situations. These limited situations include when the output format requires blob data, and when inexact rename detection is needed. There is an existing test case that tests inexact rename detection, but it also uses an output format that requires blob data, resulting in the inexact-rename-detection-only code not being tested. Update this test to use the raw output format, which does not require blob data. Thanks to Derrick Stolee for noticing this lapse in code coverage and for doing the preliminary analysis [1]. [1] https://lore.kernel.org/git/[email protected]/ Signed-off-by: Jonathan Tan <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 95acf11 commit 293194c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

t/t4067-diff-partial-clone.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ test_expect_success 'diff with rename detection batches blobs' '
125125
126126
# Ensure that there is exactly 1 negotiation by checking that there is
127127
# only 1 "done" line sent. ("done" marks the end of negotiation.)
128-
GIT_TRACE_PACKET="$(pwd)/trace" git -C client diff -M HEAD^ HEAD >out &&
129-
grep "similarity index" out &&
128+
GIT_TRACE_PACKET="$(pwd)/trace" git -C client diff --raw -M HEAD^ HEAD >out &&
129+
grep ":100644 100644.*R[0-9][0-9][0-9].*b.*c" out &&
130130
grep "git> done" trace >done_lines &&
131131
test_line_count = 1 done_lines
132132
'

0 commit comments

Comments
 (0)