aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAditya Garg <gargaditya08@live.com>2025-06-20 12:10:31 +0530
committerJunio C Hamano <gitster@pobox.com>2025-06-20 08:11:17 -0700
commit2dacd35731d9d9947913eac991599ff000468cf3 (patch)
treea26bfc7df30030484f65d2a23f07430701e1e66a
parentimap-send: add ability to list the available folders (diff)
downloadgit-2dacd35731d9d9947913eac991599ff000468cf3.tar.gz
git-2dacd35731d9d9947913eac991599ff000468cf3.zip
imap-send: display port alongwith host when git credential is invoked
When requesting for passsword, git credential helper used to display only the host name. For example: Password for 'imaps://gargaditya08%40live.com@outlook.office365.com': Now, it will display the port along with the host name: Password for 'imaps://gargaditya08%40live.com@outlook.office365.com:993': This has been done to make credential helpers more specific for ports. Also, this behaviour will also mimic git send-email, which displays the port along with the host name when requesting for a password. Signed-off-by: Aditya Garg <gargaditya08@live.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--imap-send.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/imap-send.c b/imap-send.c
index c88d842819..1894a18f90 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -1082,7 +1082,7 @@ static void server_fill_credential(struct imap_server_conf *srvc, struct credent
return;
cred->protocol = xstrdup(srvc->use_ssl ? "imaps" : "imap");
- cred->host = xstrdup(srvc->host);
+ cred->host = xstrfmt("%s:%d", srvc->host, srvc->port);
cred->username = xstrdup_or_null(srvc->user);
cred->password = xstrdup_or_null(srvc->pass);