Thread (3 messages) flat view 3 messages, 3 authors, 2021-02-16

Re: git-send-email: smtpserver in $HOME

From: Junio C Hamano <hidden>
Date: 2021-02-16 02:15:29

Possibly related (same subject, not in this thread)

Jan “Khardix” Staněk  [off-list ref] writes:
Would it be feasible to treat the `smtpserver` as path option
and expand `~`/`~user` paths?
Would it break anything
(i.e., is `~` a valid character for beginning of a hostname)?
I haven't given too much thought, but offhand do not think of a
reason why a change like the attached would break things.



 git-send-email.perl | 2 ++
 1 file changed, 2 insertions(+)
diff --git c/git-send-email.perl w/git-send-email.perl
index 1f425c0809..ff58ac5046 100755
--- c/git-send-email.perl
+++ w/git-send-email.perl
@@ -1006,6 +1006,8 @@ sub expand_one_alias {
 		}
 	}
 	$smtp_server ||= 'localhost'; # could be 127.0.0.1, too... *shrug*
+} elsif ($smtp_server =~ /^~/) {
+	$smtp_server = glob($smtp_server);
 }
 
 if ($compose && $compose > 0) {
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help