Re: [PATCH 2/2] filter-branch: fail gracefully when a filter fails
- From
Johannes Sixt <j.sixt@eudaptics.com>
- Date
- Jul 6, 2007, 07:06 UTC
- Message-ID
- <468DE9F3.B4489CDE@eudaptics.com>
- In-Reply-To
- <Pine.LNX.4.64.0707051636240.9789@racer.site>
Johannes Schindelin wrote:
Show 11 quoted lines
> - sed -e '1,/^$/d' <../commit | \ > - eval "$filter_msg" | \ > - sh -c "$filter_commit" "git commit-tree" $(git write-tree) \ > - $parentstr > ../map/$commit > + (sed -e '1,/^$/d' <../commit | > + (eval "$filter_msg" || > + die "msg filter failed: $filter_msg" 2>&3) | > + (sh -c "$filter_commit" "git commit-tree" $(git write-tree) \ > + $parentstr > ../map/$commit || > + die "commit filter failed: $filter_commit" 2>&3)) 3>&1 | > + grep . && die
You introduce a handful of new forks and an exec. Isn't an intermediate file much cheaper?
-- Hannes