Quoting Eric Sunshine <[email protected]>:

On Tue, Nov 17, 2015 at 12:10:35AM +0000, 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 token in $alias and the remainder of the line in
> $rest, and it's all done within the shell process.

Actually, putting this read in a while loop and feeding 'git send-email's output into that does fork() a subshell:

$ echo "outside: $BASH_SUBSHELL" |while read line ; do echo "$line inside: $BASH_SUBSHELL" ; done
  outside: 0  inside: 1

I'll look into this :)

My reason for asking is concern about scripts possibly breaking if
someone comes along and wants to "fix" --dump-aliases to also dump
the alias expansions. One possibility is just to punt today and say
that when that feature is needed in the future, then that someone can
add a --verbose option to complement --dump-aliases which would emit
the alias expansions as well. One nice thing about punting at this
point is that we don't (today) have to define a format for the output
of the expansions.

I think we should cross the bridge when we get to it.

However, we could still be nice to that brave soul who might want to cross it in the future, and since at this point we are interested in listing only alias names, perhaps we should not appropriate the broader '--dump-alias' option, but go with the more specific '--dump-alias-names' instead.


Gábor

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to