summaryrefslogtreecommitdiff
path: root/transport.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-08-08 21:21:34 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-08-08 21:21:34 (GMT)
commit71076e11cda645c08f5c9f269e02ed28e47d5c4a (patch)
tree4f573cff90d0f20a754dffefc1399b40d36b5d55 /transport.c
parent880b3fee51e9b5b0bb7c0361fd3bf2c5fedda5bf (diff)
parent68f3c079fe87caab2e116fd9a48bbdedc54be026 (diff)
downloadgit-71076e11cda645c08f5c9f269e02ed28e47d5c4a.zip
git-71076e11cda645c08f5c9f269e02ed28e47d5c4a.tar.gz
git-71076e11cda645c08f5c9f269e02ed28e47d5c4a.tar.bz2
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 'transport.c')
-rw-r--r--transport.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/transport.c b/transport.c
index 095e61f..be4a63e 100644
--- a/transport.c
+++ b/transport.c
@@ -359,8 +359,11 @@ static void print_ok_ref_status(struct ref *ref, int porcelain)
static int print_one_push_status(struct ref *ref, const char *dest, int count, int porcelain)
{
- if (!count)
- fprintf(porcelain ? stdout : stderr, "To %s\n", dest);
+ if (!count) {
+ char *url = transport_anonymize_url(dest);
+ fprintf(porcelain ? stdout : stderr, "To %s\n", url);
+ free(url);
+ }
switch(ref->status) {
case REF_STATUS_NONE: