Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2022-06-15 13:44:12 +0300
committerJunio C Hamano <gitster@pobox.com>2022-06-15 21:40:11 +0300
commit7281c196b1166f1c00df33948c67b0ef81ba63a9 (patch)
tree2275ad64240b68deb80082d52cd5a805a452c72b /t/t5516-fetch-push.sh
parent4a169da280aa6d22bdf0cf5baea65f47bd363a3a (diff)
transfer doc: move fetch.credentialsInUrl to "transfer" config namespace
Rename the "fetch.credentialsInUrl" configuration variable introduced in 6dcbdc0d661 (remote: create fetch.credentialsInUrl config, 2022-06-06) to "transfer". There are existing exceptions, but generally speaking the "<namespace>.<var>" configuration should only apply to command described in the "namespace" (and its sub-commands, so e.g. "clone.*" or "fetch.*" might also configure "git-remote-https"). But in the case of "fetch.credentialsInUrl" we've got a configuration variable that configures the behavior of all of "clone", "push" and "fetch", someone adjusting "fetch.*" configuration won't expect to have the behavior of "git push" altered, especially as we have the pre-existing "{transfer,fetch,receive}.fsckObjects", which configures different parts of the transfer dialog. So let's move this configuration variable to the "transfer" namespace before it's exposed in a release. We could add all of "{transfer,fetch,pull}.credentialsInUrl" at some other time, but once we have "fetch" configure "pull" such an arrangement would would be a confusing mess, as we'd at least need to have "fetch" configure "push" (but not the other way around), or change existing behavior. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Acked-by: Derrick Stolee <derrickstolee@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5516-fetch-push.sh')
-rwxr-xr-xt/t5516-fetch-push.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh
index dedca106a7..79d8a7b367 100755
--- a/t/t5516-fetch-push.sh
+++ b/t/t5516-fetch-push.sh
@@ -1836,18 +1836,18 @@ test_expect_success 'refuse to push a hidden ref, and make sure do not pollute t
test_expect_success 'fetch warns or fails when using username:password' '
message="URL '\''https://username:<redacted>@localhost/'\'' uses plaintext credentials" &&
- test_must_fail git -c fetch.credentialsInUrl=allow fetch https://username:password@localhost 2>err &&
+ test_must_fail git -c transfer.credentialsInUrl=allow fetch https://username:password@localhost 2>err &&
! grep "$message" err &&
- test_must_fail git -c fetch.credentialsInUrl=warn fetch https://username:password@localhost 2>err &&
+ test_must_fail git -c transfer.credentialsInUrl=warn fetch https://username:password@localhost 2>err &&
grep "warning: $message" err >warnings &&
test_line_count = 3 warnings &&
- test_must_fail git -c fetch.credentialsInUrl=die fetch https://username:password@localhost 2>err &&
+ test_must_fail git -c transfer.credentialsInUrl=die fetch https://username:password@localhost 2>err &&
grep "fatal: $message" err >warnings &&
test_line_count = 1 warnings &&
- test_must_fail git -c fetch.credentialsInUrl=die fetch https://username:@localhost 2>err &&
+ test_must_fail git -c transfer.credentialsInUrl=die fetch https://username:@localhost 2>err &&
grep "fatal: $message" err >warnings &&
test_line_count = 1 warnings
'
@@ -1855,12 +1855,12 @@ test_expect_success 'fetch warns or fails when using username:password' '
test_expect_success 'push warns or fails when using username:password' '
message="URL '\''https://username:<redacted>@localhost/'\'' uses plaintext credentials" &&
- test_must_fail git -c fetch.credentialsInUrl=allow push https://username:password@localhost 2>err &&
+ test_must_fail git -c transfer.credentialsInUrl=allow push https://username:password@localhost 2>err &&
! grep "$message" err &&
- test_must_fail git -c fetch.credentialsInUrl=warn push https://username:password@localhost 2>err &&
+ test_must_fail git -c transfer.credentialsInUrl=warn push https://username:password@localhost 2>err &&
grep "warning: $message" err >warnings &&
- test_must_fail git -c fetch.credentialsInUrl=die push https://username:password@localhost 2>err &&
+ test_must_fail git -c transfer.credentialsInUrl=die push https://username:password@localhost 2>err &&
grep "fatal: $message" err >warnings &&
test_line_count = 1 warnings
'