aboutsummaryrefslogtreecommitdiffstats
path: root/git-send-email.perl
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-05-19 16:02:45 -0700
committerJunio C Hamano <gitster@pobox.com>2025-05-19 16:02:45 -0700
commitae0b60e0095a118af7bb4026622d8c308e0a4c52 (patch)
tree04d0b6276ab833f075589a15117b95d6a847249d /git-send-email.perl
parentMerge branch 'sc/bundle-uri-use-all-refs-in-bundle' (diff)
parentdocs: add credential helper for outlook and gmail in OAuth list of helpers (diff)
downloadgit-ae0b60e0095a118af7bb4026622d8c308e0a4c52.tar.gz
git-ae0b60e0095a118af7bb4026622d8c308e0a4c52.zip
Merge branch 'ag/doc-send-email'
The `send-email` documentation has been updated with OAuth2.0 related examples. * ag/doc-send-email: docs: add credential helper for outlook and gmail in OAuth list of helpers docs: improve send-email documentation send-mail: improve checks for valid_fqdn
Diffstat (limited to 'git-send-email.perl')
-rwxr-xr-xgit-send-email.perl4
1 files changed, 3 insertions, 1 deletions
diff --git a/git-send-email.perl b/git-send-email.perl
index 4215f8f7e9..55b7e00d29 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -1359,7 +1359,9 @@ sub process_address_list {
sub valid_fqdn {
my $domain = shift;
- return defined $domain && !($^O eq 'darwin' && $domain =~ /\.local$/) && $domain =~ /\./;
+ my $subdomain = '(?!-)[A-Za-z0-9-]{1,63}(?<!-)';
+ return defined $domain && !($^O eq 'darwin' && $domain =~ /\.local$/)
+ && $domain =~ /^$subdomain(?:\.$subdomain)*$/;
}
sub maildomain_net {