Re: [PATCH v2 1/2] sendemail: teach git-send-email to list aliases

2015-11-17 Thread Jacob Keller
On Tue, Nov 17, 2015 at 4:26 AM, SZEDER Gábor wrote: > > Quoting Eric Sunshine : > >> On Tue, Nov 17, 2015 at 12:10:35AM +, Keller, Jacob E wrote: >>> >>> On Mon, 2015-11-16 at 18:50 -0500, Eric Sunshine wrote: >>> > It should be possible to extract

Re: [PATCH v2 1/2] sendemail: teach git-send-email to list aliases

2015-11-17 Thread SZEDER Gábor
Quoting Eric Sunshine : On Tue, Nov 17, 2015 at 12:10:35AM +, Keller, Jacob E wrote: On Mon, 2015-11-16 at 18:50 -0500, Eric Sunshine wrote: > It should be possible to extract the alias within the shell itself > without a separate process. For instance: > >

Re: [PATCH v2 1/2] sendemail: teach git-send-email to list aliases

2015-11-17 Thread Jacob Keller
On Mon, Nov 16, 2015 at 11:20 PM, Eric Sunshine wrote: > Since git-send-email.perl already configures GetOpt::Long with the > 'pass_through' option, one possibility would be to invoke > GetOptions() once for --list-aliases (or --dump-aliases), and then > again for the

Re: [PATCH v2 1/2] sendemail: teach git-send-email to list aliases

2015-11-16 Thread Keller, Jacob E
On Mon, 2015-11-16 at 18:56 -0500, Eric Sunshine wrote: > On Mon, Nov 16, 2015 at 6:50 PM, Eric Sunshine om> wrote: > > Also, shouldn't --list-aliases (or --dump-aliases) be mutually > > exclusive with many of the other options? New tests would check > > such > >

Re: [PATCH v2 1/2] sendemail: teach git-send-email to list aliases

2015-11-16 Thread Eric Sunshine
On Mon, Nov 16, 2015 at 6:40 PM, Keller, Jacob E wrote: > On Mon, 2015-11-16 at 18:30 -0500, Eric Sunshine wrote: >> Also, is it possible that some consumer down the road might want >> richer output which includes the expansion of each alias? For >> instance, it could

Re: [PATCH v2 1/2] sendemail: teach git-send-email to list aliases

2015-11-16 Thread Keller, Jacob E
On Mon, 2015-11-16 at 18:50 -0500, Eric Sunshine wrote: > It should be possible to extract the alias within the shell itself > without a separate process. For instance: > > read alias rest > > will leave the first token in $alias and the remainder of the line in > $rest, and it's all done

Re: [PATCH v2 1/2] sendemail: teach git-send-email to list aliases

2015-11-16 Thread Keller, Jacob E
On Mon, 2015-11-16 at 18:30 -0500, Eric Sunshine wrote: > On Sun, Nov 15, 2015 at 3:22 PM, Jacob Keller om> wrote: > > Add an option "list-aliases" which changes the default behavior of > > git-send-email. This mode will simply read the alias files > > configured by > >

Re: [PATCH v2 1/2] sendemail: teach git-send-email to list aliases

2015-11-16 Thread Eric Sunshine
On Sun, Nov 15, 2015 at 3:22 PM, Jacob Keller wrote: > Add an option "list-aliases" which changes the default behavior of > git-send-email. This mode will simply read the alias files configured by > sendemail.aliasesfile and sendemail.aliasfiletype and print a list of >

Re: [PATCH v2 1/2] sendemail: teach git-send-email to list aliases

2015-11-16 Thread Eric Sunshine
On Mon, Nov 16, 2015 at 6:50 PM, Eric Sunshine wrote: > Also, shouldn't --list-aliases (or --dump-aliases) be mutually > exclusive with many of the other options? New tests would check such > exclusivity as well. In fact, while I agree with Szeder that it makes sense to

Re: [PATCH v2 1/2] sendemail: teach git-send-email to list aliases

2015-11-16 Thread Eric Sunshine
On Tue, Nov 17, 2015 at 12:10:35AM +, Keller, Jacob E wrote: > On Mon, 2015-11-16 at 18:50 -0500, Eric Sunshine wrote: > > It should be possible to extract the alias within the shell itself > > without a separate process. For instance: > > > > read alias rest > > > > will leave the first

[PATCH v2 1/2] sendemail: teach git-send-email to list aliases

2015-11-15 Thread Jacob Keller
From: Jacob Keller Add an option "list-aliases" which changes the default behavior of git-send-email. This mode will simply read the alias files configured by sendemail.aliasesfile and sendemail.aliasfiletype and print a list of all known aliases. The intended usecase for