On Wed, Jun 17, 2015 at 03:23:49PM -0700, Junio C Hamano wrote:

> Jeff King <p...@peff.net> writes:
> 
> > On Wed, Jun 17, 2015 at 05:11:21PM -0400, Richard Hansen wrote:
> >
> >> +          test -z "$1" && test -n "$quiet" && return
> >> +          eval "say_color_color=\$say_color_$1"
> >
> > Thanks, this looks much simpler.
> >
> > In the non-quiet case, you will eval $say_color_, even though we know it
> > to be bogus.
> 
> Yeah, but there is this gem in this patch:
> 
> +     ...
> +     say_color_info=$(tput setaf 6) # cyan
> +     say_color_reset=$(tput sgr0)
> +     say_color_="" # no formatting for normal text

Oh, sorry, I was so focused on the later part that I totally missed
that. That is rather elegant, and nicer than what I wrote.

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

Reply via email to