Re: [TopGit PATCH] tg-create.sh: Support for multiple {to,cc,bcc} options

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

 



On Fri, Aug 08, 2008 at 06:37:13PM -0700, Junio C Hamano wrote:
> Petr Baudis <pasky@xxxxxxx> writes:
> 
> >> +	prefix="$(echo "$2" | sed -e 's/\//\\\\\//g')"
> >
> > Maybe use s### ? ;-)
> 
> Personally I like '|' instead.  It's much less visually distracting than #.

I'm just used to '#' more, but either is fine for me.

> >> +
> >> +	git config --get-all topgit.$1 2>/dev/null |
> >> +		sed -e "s/^/$prefix /g"
> >> +}
> >
> > Won't this return an error code and terminate the script in case no
> > option is defined?
> 
> Exit code from upstream of a pipe does not affect the exit code from the
> pipeline, and sed does not exit non-zero just because there was no
> substitution.

Oh, you're right - somehow I didn't quite absorb that pipe is used late
at the night. ;-) I still don't understand the stderr redirect, though.

				Petr "Pasky" Baudis
--
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]

  Powered by Linux