Skip to content

Commit 2dacd35

Browse files
AdityaGarg8gitster
authored andcommitted
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%[email protected]': Now, it will display the port along with the host name: Password for 'imaps://gargaditya08%[email protected]: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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 067a91b commit 2dacd35

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

imap-send.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1082,7 +1082,7 @@ static void server_fill_credential(struct imap_server_conf *srvc, struct credent
10821082
return;
10831083

10841084
cred->protocol = xstrdup(srvc->use_ssl ? "imaps" : "imap");
1085-
cred->host = xstrdup(srvc->host);
1085+
cred->host = xstrfmt("%s:%d", srvc->host, srvc->port);
10861086

10871087
cred->username = xstrdup_or_null(srvc->user);
10881088
cred->password = xstrdup_or_null(srvc->pass);

0 commit comments

Comments
 (0)