Skip to content

Commit 40d8178

Browse files
peffgitster
authored andcommitted
t5500: fix mistaken $SERVER reference in helper function
The end of t5500 contains two tests which use a single helper function, fetch_filter_blob_limit_zero(). It takes a parameter to point to the path of the server repository, which we store locally as $SERVER. The first caller uses the relative path "server", while the second points into the httpd document root. Commit 07ef3c6 (fetch test: use more robust test for filtered objects, 2019-12-23) refactored some lines, but accidentally switched "$SERVER" to "server" in one spot. That means the second caller is looking at the server directory from the previous test rather than its own. This happens to work out because the "server" directory from the first test is still hanging around, and the contents of the two are identical. But it was clearly not the intended behavior, and is fragile to cleaning up the leftovers from the first test. Signed-off-by: Jeff King <[email protected]> Reviewed-by: Jonathan Nieder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3c2a3fd commit 40d8178

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/t5500-fetch-pack.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1046,7 +1046,7 @@ fetch_filter_blob_limit_zero () {
10461046

10471047
# Ensure that commit is fetched, but blob is not
10481048
commit=$(git -C "$SERVER" rev-parse two) &&
1049-
blob=$(git hash-object server/two.t) &&
1049+
blob=$(git hash-object "$SERVER/two.t") &&
10501050
git -C client rev-list --objects --missing=allow-any "$commit" >oids &&
10511051
grep "$commit" oids &&
10521052
! grep "$blob" oids

0 commit comments

Comments
 (0)