All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: David Kastrup <dak@gnu.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 2/2] filter-branch: fail gracefully when a filter fails
Date: Fri, 06 Jul 2007 01:33:02 -0700	[thread overview]
Message-ID: <7vir8yextt.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <863b02j6qs.fsf@lola.quinscape.zz> (David Kastrup's message of "Fri, 06 Jul 2007 10:06:51 +0200")

David Kastrup <dak@gnu.org> writes:

> Instead of "grep ." one could also do something like
>
> if read line then
>   while echo "$line" && read line; do :; done
>   die
> fi
>
> which is fork-less.

I'd agree with you that "grep ^" would be preferable _if_ we
were to do this.  But in your fork-less example, you are
assuming that (1) "read" does not molest what is read, (2)
"echo" is built-in, and (3) "echo" does not munge the
parameter.

Since I am one of old fashioned shell people (I readily admit
that I used to have _fun_ with autoconf generated shell
scripts), I'd love to continue shell skill show-offs, but for
the purpose of updating this script, I would say a temporary
file is much better than any of the alternatives around 1>&3.
For one thing, it would make debugging the script while
developing and tweaking it, _and_ while using it, much more
pleasant.

  reply	other threads:[~2007-07-06  8:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-04 14:36 [PATCH 2/2] filter-branch: fail gracefully when a filter fails Johannes Schindelin
2007-07-05 13:58 ` Jeff King
2007-07-05 15:38   ` Johannes Schindelin
2007-07-05 16:52     ` Junio C Hamano
2007-07-06  7:06     ` Johannes Sixt
2007-07-06  8:06       ` David Kastrup
2007-07-06  8:33         ` Junio C Hamano [this message]
2007-07-06  9:31           ` Jeff King
2007-07-06  3:22   ` Josh Triplett
2007-07-06  3:18     ` Johannes Schindelin

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=7vir8yextt.fsf@assigned-by-dhcp.cox.net \
    --to=gitster@pobox.com \
    --cc=dak@gnu.org \
    --cc=git@vger.kernel.org \
    /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.