]> Kevux Git Server - rit/commit
contrib: better support symbolic port names in git-credential-netrc
authorMaxim Cournoyer <maxim@guixotic.coop>
Wed, 25 Jun 2025 14:25:11 +0000 (23:25 +0900)
committerJunio C Hamano <gitster@pobox.com>
Wed, 25 Jun 2025 16:43:59 +0000 (09:43 -0700)
commit1926d9b6dac2cc7584362fb9275b55c2904891d3
tree993980cb19b01d539cbef378399825d1dda772bd
parent53ca38298d69529e59e33a21e63040aef509bbf8
contrib: better support symbolic port names in git-credential-netrc

To improve support for symbolic port names in netrc files, this
changes does the following:

 - Treat symbolic port names as ports, not protocols in git-credential-netrc
 - Validate the SMTP server port provided to send-email
 - Convert the above symbolic port names to their numerical values.

Before this change, it was not possible to have a SMTP server port set
to "smtps" in a netrc file (e.g. Emacs' ~/.authinfo.gpg), as it would
be registered as a protocol and break the match for a "smtp" protocol
host, as queried for by git-send-email.

Signed-off-by: Maxim Cournoyer <maxim@guixotic.coop>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/credential/netrc/git-credential-netrc.perl
contrib/credential/netrc/test.pl
git-send-email.perl
perl/Git.pm
t/t9001-send-email.sh