diff options
Diffstat (limited to 'third_party/git/t/t5537-fetch-shallow.sh')
-rwxr-xr-x | third_party/git/t/t5537-fetch-shallow.sh | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/third_party/git/t/t5537-fetch-shallow.sh b/third_party/git/t/t5537-fetch-shallow.sh index 4f681dbbe11c..66f0b64d3927 100755 --- a/third_party/git/t/t5537-fetch-shallow.sh +++ b/third_party/git/t/t5537-fetch-shallow.sh @@ -15,11 +15,7 @@ test_expect_success 'setup' ' commit 2 && commit 3 && commit 4 && - git config --global transfer.fsckObjects true && - test_oid_cache <<-EOF - perl sha1:s/0034shallow %s/0036unshallow %s/ - perl sha256:s/004cshallow %s/004eunshallow %s/ - EOF + git config --global transfer.fsckObjects true ' test_expect_success 'setup shallow clone' ' @@ -237,29 +233,26 @@ test_expect_success 'shallow fetches check connectivity before writing shallow f git -C "$REPO" config protocol.version 2 && git -C client config protocol.version 2 && - git -C client fetch --depth=2 "$HTTPD_URL/one_time_perl/repo" master:a_branch && + git -C client fetch --depth=2 "$HTTPD_URL/one_time_sed/repo" master:a_branch && # Craft a situation in which the server sends back an unshallow request # with an empty packfile. This is done by refetching with a shorter # depth (to ensure that the packfile is empty), and overwriting the # shallow line in the response with the unshallow line we want. - printf "$(test_oid perl)" \ + printf "s/0034shallow %s/0036unshallow %s/" \ "$(git -C "$REPO" rev-parse HEAD)" \ "$(git -C "$REPO" rev-parse HEAD^)" \ - >"$HTTPD_ROOT_PATH/one-time-perl" && + >"$HTTPD_ROOT_PATH/one-time-sed" && test_must_fail env GIT_TEST_SIDEBAND_ALL=0 git -C client \ - fetch --depth=1 "$HTTPD_URL/one_time_perl/repo" \ + fetch --depth=1 "$HTTPD_URL/one_time_sed/repo" \ master:a_branch && - # Ensure that the one-time-perl script was used. - ! test -e "$HTTPD_ROOT_PATH/one-time-perl" && + # Ensure that the one-time-sed script was used. + ! test -e "$HTTPD_ROOT_PATH/one-time-sed" && # Ensure that the resulting repo is consistent, despite our failure to # fetch. git -C client fsck ' -# DO NOT add non-httpd-specific tests here, because the last part of this -# test script is only executed when httpd is available and enabled. - test_done |