Merge branch 'sg/test-lib-simplify-expr-away'
[gitweb.git] / t / t5550-http-fetch-dumb.sh
index 64146352ae20e9a5abdcda77be514d0f3264c3b8..48e2ab62da7a4293dd647524f75f3590783bcb02 100755 (executable)
@@ -91,6 +91,23 @@ test_expect_success 'configured username does not override URL' '
        expect_askpass pass user@host
 '
 
+test_expect_success 'cmdline credential config passes into submodules' '
+       git init super &&
+       set_askpass user@host pass@host &&
+       (
+               cd super &&
+               git submodule add "$HTTPD_URL/auth/dumb/repo.git" sub &&
+               git commit -m "add submodule"
+       ) &&
+       set_askpass wrong pass@host &&
+       test_must_fail git clone --recursive super super-clone &&
+       rm -rf super-clone &&
+       set_askpass wrong pass@host &&
+       git -c "credential.$HTTP_URL.username=user@host" \
+               clone --recursive super super-clone &&
+       expect_askpass pass user@host
+'
+
 test_expect_success 'fetch changes via http' '
        echo content >>file &&
        git commit -a -m two &&