Merge branch 'mc/netrc-service-names'
"netrc" credential helper has been improved to understand textual service names (like smtp) in addition to the numeric port numbers (like 25). * mc/netrc-service-names: contrib: better support symbolic port names in git-credential-netrc contrib: warn for invalid netrc file ports in git-credential-netrc contrib: use a more portable shebang for git-credential-netrc
This commit is contained in:
@@ -2112,6 +2112,17 @@ if ($validate) {
|
||||
}
|
||||
}
|
||||
|
||||
# Validate the SMTP server port, if provided.
|
||||
if (defined $smtp_server_port) {
|
||||
my $port = Git::port_num($smtp_server_port);
|
||||
if ($port) {
|
||||
$smtp_server_port = $port;
|
||||
} else {
|
||||
die sprintf(__("error: invalid SMTP port '%s'\n"),
|
||||
$smtp_server_port);
|
||||
}
|
||||
}
|
||||
|
||||
# Run the loop once again to avoid gaps in the counter due to FIFO
|
||||
# arguments provided by the user.
|
||||
my $num = 1;
|
||||
|
||||
Reference in New Issue
Block a user