git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Petr Baudis <pasky@suse.cz>
Date
Aug 9, 2008, 08:27 UTC
Message-ID
<20080809082701.GE32184@machine.or.cz>
In-Reply-To
<7vbq039dfa.fsf@gitster.siamese.dyndns.org>
On Fri, Aug 08, 2008 at 06:37:13PM -0700, Junio C Hamano wrote:
Show 7 quoted lines
> Petr Baudis <pasky@suse.cz> 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.
Show 11 quoted lines
> >> +
> >> +	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
Previous: Bert WesargNext: Bert Wesarg
Message 5 of 6 in “tg-create.sh: Support for multiple {to,cc,bcc} options”
  1. tg-create.sh: Support for multiple {to,cc,bcc} optionsBert Wesarg, Aug 7, 2008
  2. Petr BaudisAug 9, 2008
  3. Junio C HamanoAug 9, 2008
  4. Bert WesargAug 9, 2008
  5. Petr BaudisAug 9, 2008
  6. Bert WesargAug 9, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.