Re: [PATCH] send-email: new 'add-envelope' option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Felipe Contreras <felipe.contreras@xxxxxxxxx> writes:

> I thought a bit more about this, and in the end what we really want is
> to add the sender envelope. The most typical case would be to use the
> 'from' address, but we should be able to override it (we do both by
> using --envelope-sender).
>
> So here are other options.
>
> a) --add-envelope: add the sender envelope, by default it would be the
> 'from' address, but could be overridden by --envelope-sender.

I do not think the latter half of this description makes much sense, as
the existing --envelope-sender=<this-address> alone already says "add this
envelope sender".

It is unfortunate that we cannot sanely have an option that takes an
optional string argument from the command line.  Ideally, if we can
specify --envelope-sender without any argument, we could make it to mean
"pretend as if the 'from' address is given to this option", but that would
make the command line pasing ambiguous, so we would need an extra option
like this one.  "--envelope-sender=from" might be a more intuitive way to
say this, though.

> b) --envelope-sender="" or "auto": this would require minimal changes
> but looks a bita strange.

An explicit empty string does look very strange, but I do not think a
magic word like "auto" (or "from") that cannot sanely be your envelope
sender address is a bad idea.

> Any thoughts?

It is much easier to work on the configuration front, by the way, and I
expect people who regularly interact with multiple projects to appreciate
this feature would configure their send-email once and forget about it, so
the command line clunkiness might not be such a big issue.

A user who works with more than one projects with different identity known
to each project would use $HOME/.gitconfig and send-email configuration
identity feature to set "sendemail.<identity>.from" and friends in there,
while setting sendemail.identity configuration in .git/config for each
project, so being able to say "use whatever 'from' as the envelope sender"
once in $HOME/.gitconfig would be convenient.

So I could have in $HOME/.gitconfig:

        [sendemail]
		; used as a boolean to say "use from"
                envelopesender
        [sendemail.git]
                from = Junio C Hamano <gitster@xxxxxxxxx>
                to = git mailing list <git@xxxxxxxxxxxxxxx>
        [sendemail.frotz]
                from = Junio C Hamano <frotzster@xxxxxxxxxx>
                to = frotz mailing list <frotz@xxxxxxxxxx>

and then in my {git,frotz}.git/.git/config would have

        [sendemail]                     [sendemail]
                identity = git                  identity = frotz

respectively.  Without your patch, in $HOME/.gitconfig, I wouldn't have
the global sendemail.envelopesender but have separate individual
configuration variables sendemail.{git,frotz}.envelopesender defined.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]