Skip to content

Commit c4cd979

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 4cd6f32 commit c4cd979

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
@@ -1089,7 +1089,7 @@ static void server_fill_credential(struct imap_server_conf *srvc, struct credent
10891089
return;
10901090

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

10941094
cred->username = xstrdup_or_null(srvc->user);
10951095
cred->password = xstrdup_or_null(srvc->pass);

0 commit comments

Comments
 (0)