Re: How can I specify the "sendmail" program for git-send-email?

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: How can I specify the "sendmail" program for git-send-email?

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:54:02

Erik Faye-Lund [off-list ref] writes:
Well, I've always been slightly annoyed by the "send-mail" vs
"sendemail" inconsistency.
Hrm, isn't it between "sendmail" (as in /usr/lib/sendmail) and
"send-email" (a subcommand of git)?
Perhaps we could do something along these
lines (plus all documentation-updates, omitted for clarity) to reduce
the risk of confusion?
Assuming that the contrast between "sendmail" and "git send-email"
is what you are trying to address, I fail to see how it would help
reducing the confusion if you start naming configuration variables
used by "git send-email" without E.

If the proposal were to give "send-email.$var" synomyms to
corresponding "sendemail.$var" variables, I would have been
persuaded to believe it may alleviate potential confusion, though.
quoted hunk
Yeah, the leaking of $identity between different sections is a bit
suboptimal, but as a fallback-mechanism I don't think it actually
matters much.
diff --git a/git-send-email.perl b/git-send-email.perl
index 03292fd..d167d96 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -375,7 +375,11 @@ sub read_config {
 	}
 }

-# read configuration from [sendemail "$identity"], fall back on [sendemail]
+# read configuration from [sendmail "$identity"], fall back on [sendmail]
+$identity = Git::config(@repo, "sendmail.identity") unless (defined $identity);
+read_config("sendmail.$identity") if (defined $identity);
+read_config("sendmail");
+# same as above, but with legacy "sendemail"
 $identity = Git::config(@repo, "sendemail.identity") unless (defined
$identity);
 read_config("sendemail.$identity") if (defined $identity);
 read_config("sendemail");

Re: How can I specify the "sendmail" program for git-send-email?

From: Erik Faye-Lund <hidden>
Date: 2016-06-15 22:54:02

On Mon, Jun 11, 2012 at 5:57 PM, Junio C Hamano [off-list ref] wrote:
Erik Faye-Lund [off-list ref] writes:
quoted
Well, I've always been slightly annoyed by the "send-mail" vs
"sendemail" inconsistency.
Hrm, isn't it between "sendmail" (as in /usr/lib/sendmail) and
"send-email" (a subcommand of git)?
Ugh, you are right. My brain must have been defective :)
quoted
Perhaps we could do something along these
lines (plus all documentation-updates, omitted for clarity) to reduce
the risk of confusion?
Assuming that the contrast between "sendmail" and "git send-email"
is what you are trying to address, I fail to see how it would help
reducing the confusion if you start naming configuration variables
used by "git send-email" without E.
No, this was just me being a moron.
If the proposal were to give "send-email.$var" synomyms to
corresponding "sendemail.$var" variables, I would have been
persuaded to believe it may alleviate potential confusion, though.
This was really the way I wanted to go, but I somehow got unsure about
the legality of the dashes in config sections. I'm a bit skeptical to
introducing new non-letter characters if we don't have to.

So let's just drop my suggestion. I wasn't thinking straight.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help