Re: [PATCH v4] send-email: Add simple email aliases format
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- May 22, 2015, 04:29 UTC
- Message-ID
- <CAPig+cRLxk26p7DFaS+gRkKZxkRwf8g=4=j2QHX6AC2Uk5J++w@mail.gmail.com>
- In-Reply-To
- <9f88da801466c83331d02262855e8bef4164e5eb.1432266004.git.allenbh@gmail.com>
On Thu, May 21, 2015 at 11:40 PM, Allen Hubbe <allenbh@gmail.com> wrote:
Show 18 quoted lines
> This format is more simple than the other alias file formats, so it may > be preferred by some users. [...] > Signed-off-by: Allen Hubbe <allenbh@gmail.com> > --- > diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt > index 804554609def..38ade31e0c28 100644 > --- a/Documentation/git-send-email.txt > +++ b/Documentation/git-send-email.txt > @@ -383,7 +383,29 @@ sendemail.aliasesFile:: > > sendemail.aliasFileType:: > Format of the file(s) specified in sendemail.aliasesFile. Must be > - one of 'mutt', 'mailrc', 'pine', 'elm', or 'gnus'. > + one of 'simple', 'mutt', 'mailrc', 'pine', 'elm', or 'gnus'. > ++ > +If the format is 'simple', then the alias file format is described below. > +Descriptions of the other file formats to the following formats can be found in > +the documentation of the email program of the same name.
The second sentence probably needs some proof-reading.
Show 8 quoted lines
> ++ > +This 'simple' format is is as follows. > ++ > + <alias>: <address|alias>[, <address|alias>...] > ++ > +Aliases are specified one per line. There is no line splitting. Anything on a > +line after and including a `#` symbol is considered a comment, and is ignored. > +Blank lines are ignored.
I'm not convinced that gratuitously diverging from the sendmail/postfix 'aliases' format is warranted. In particular, that format recognizes a comment line only when '#' is the first non-whitespace character[1]; and does not consider '#' a comment-introducer anywhere else in the line. By recognizing '#' anywhere as a comment-introducer, you may be painting this format into a corner rather than leaving it open for someone later to extend it to be more sendmail/postfix-like by, for instance, supporting name quoting and line-continuation[1].
For the same reason, I'm not convinced that "simple" is a good name. "sendmail" may indeed be a more appropriate name, even if it means that this early implementation documents it as (currently) a subset of the richer sendmail/postfix 'aliases' format. By doing so, we leave the door open so a future person can implement additional features to bring it closer to that format.
[1]: http://www.postfix.org/aliases.5.html
Show 10 quoted lines
> ++ > +Example of the 'simple' format: > ++ > + alice: Alice W Land <awol@example.com> > + bob: Robert Bobbyton <bob@example.com> > + # this is a comment > + # this is also a comment > + chloe: chloe@example.com > + abgroup: alice, bob # comment after an alias > + bcgrp: bob, chloe, Other <o@example.com>