diff options
| author | Junio C Hamano <gitster@pobox.com> | 2020-06-17 21:54:01 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2020-06-17 21:54:01 -0700 |
| commit | 524caf80358b1158c40d1947e61d576c8a0c0a8c (patch) | |
| tree | 94ffa57db5f1b1877da97aefd9a6ed2b5f0f7064 /t/t5541-http-push-smart.sh | |
| parent | abacefe865ea02655b17ba6fad860788c30e7fed (diff) | |
| parent | 46da295a77066994a663a47dc044f6c6fe582d26 (diff) | |
| download | git-524caf80358b1158c40d1947e61d576c8a0c0a8c.tar.gz | |
Merge branch 'js/reflog-anonymize-for-clone-and-fetch'
The reflog entries for "git clone" and "git fetch" did not
anonymize the URL they operated on.
* js/reflog-anonymize-for-clone-and-fetch:
clone/fetch: anonymize URLs in the reflog
Diffstat (limited to 't/t5541-http-push-smart.sh')
| -rwxr-xr-x | t/t5541-http-push-smart.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/t/t5541-http-push-smart.sh b/t/t5541-http-push-smart.sh index afc680d5e3..463d0f12e5 100755 --- a/t/t5541-http-push-smart.sh +++ b/t/t5541-http-push-smart.sh @@ -464,6 +464,21 @@ test_expect_success 'push status output scrubs password' ' grep "^To $HTTPD_URL/smart/test_repo.git" status ' +test_expect_success 'clone/fetch scrubs password from reflogs' ' + cd "$ROOT_PATH" && + git clone "$HTTPD_URL_USER_PASS/smart/test_repo.git" \ + reflog-test && + cd reflog-test && + test_commit prepare-for-force-fetch && + git switch -c away && + git fetch "$HTTPD_URL_USER_PASS/smart/test_repo.git" \ + +master:master && + # should have been scrubbed down to vanilla URL + git log -g master >reflog && + grep "$HTTPD_URL" reflog && + ! grep "$HTTPD_URL_USER_PASS" reflog +' + test_expect_success 'colorize errors/hints' ' cd "$ROOT_PATH"/test_repo_clone && test_must_fail git -c color.transport=always -c color.advice=always \ |
