All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Baudis <pasky@suse.cz>
To: Junio C Hamano <gitster@pobox.com>
Cc: Bert Wesarg <bert.wesarg@googlemail.com>, git@vger.kernel.org
Subject: Re: [TopGit PATCH] tg-create.sh: Support for multiple {to,cc,bcc} options
Date: Sat, 9 Aug 2008 10:27:01 +0200	[thread overview]
Message-ID: <20080809082701.GE32184@machine.or.cz> (raw)
In-Reply-To: <7vbq039dfa.fsf@gitster.siamese.dyndns.org>

On Fri, Aug 08, 2008 at 06:37:13PM -0700, Junio C Hamano wrote:
> 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.

> >> +
> >> +	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

  parent reply	other threads:[~2008-08-09  8:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-07 20:31 [TopGit PATCH] tg-create.sh: Support for multiple {to,cc,bcc} options Bert Wesarg
2008-08-09  0:33 ` Petr Baudis
2008-08-09  1:37   ` Junio C Hamano
2008-08-09  7:23     ` Bert Wesarg
2008-08-09  8:27     ` Petr Baudis [this message]
2008-08-09 10:49       ` Bert Wesarg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080809082701.GE32184@machine.or.cz \
    --to=pasky@suse.cz \
    --cc=bert.wesarg@googlemail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.