summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2016-08-08 14:21:34 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-08-08 14:21:34 -0700
commit71076e11cda645c08f5c9f269e02ed28e47d5c4a (patch)
tree4f573cff90d0f20a754dffefc1399b40d36b5d55 /t
parentMerge branch 'nd/cache-tree-ita' into maint (diff)
parentt5541: fix url scrubbing test when GPG is not set (diff)
downloadtgif-71076e11cda645c08f5c9f269e02ed28e47d5c4a.tar.xz
Merge branch 'jk/push-scrub-url' into maint
"git fetch http://user:pass@host/repo..." scrubbed the userinfo part, but "git push" didn't. * jk/push-scrub-url: t5541: fix url scrubbing test when GPG is not set push: anonymize URL in status output
Diffstat (limited to 't')
-rwxr-xr-xt/t5541-http-push-smart.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t5541-http-push-smart.sh b/t/t5541-http-push-smart.sh
index fd7d06b9a2..9593fc17f3 100755
--- a/t/t5541-http-push-smart.sh
+++ b/t/t5541-http-push-smart.sh
@@ -368,5 +368,14 @@ test_expect_success GPG 'push with post-receive to inspect certificate' '
test_cmp expect "$HTTPD_DOCUMENT_ROOT_PATH/push-cert-status"
'
+test_expect_success 'push status output scrubs password' '
+ cd "$ROOT_PATH/test_repo_clone" &&
+ git push --porcelain \
+ "$HTTPD_URL_USER_PASS/smart/test_repo.git" \
+ +HEAD:scrub >status &&
+ # should have been scrubbed down to vanilla URL
+ grep "^To $HTTPD_URL/smart/test_repo.git" status
+'
+
stop_httpd
test_done