Merge branch 'sb/submodule-recommend-shallowness'
[gitweb.git] / t / t5551-http-fetch-smart.sh
index e44fe72c7aa4d670a6796a5c342e8e131fac6a8d..2f375eb94d528baefad038ff5b07baf0fe08d1fc 100755 (executable)
@@ -283,10 +283,20 @@ test_expect_success EXPENSIVE 'http can handle enormous ref negotiation' '
 '
 
 test_expect_success 'custom http headers' '
-       test_must_fail git fetch "$HTTPD_URL/smart_headers/repo.git" &&
+       test_must_fail git -c http.extraheader="x-magic-two: cadabra" \
+               fetch "$HTTPD_URL/smart_headers/repo.git" &&
        git -c http.extraheader="x-magic-one: abra" \
            -c http.extraheader="x-magic-two: cadabra" \
-           fetch "$HTTPD_URL/smart_headers/repo.git"
+           fetch "$HTTPD_URL/smart_headers/repo.git" &&
+       git update-index --add --cacheinfo 160000,$(git rev-parse HEAD),sub &&
+       git config -f .gitmodules submodule.sub.path sub &&
+       git config -f .gitmodules submodule.sub.url \
+               "$HTTPD_URL/smart_headers/repo.git" &&
+       git submodule init sub &&
+       test_must_fail git submodule update sub &&
+       git -c http.extraheader="x-magic-one: abra" \
+           -c http.extraheader="x-magic-two: cadabra" \
+               submodule update sub
 '
 
 stop_httpd