Re: [PATCH 2/2] filter-branch: fail gracefully when a filter fails

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

 



Johannes Schindelin <Johannes.Schindelin@xxxxxx> writes:

> On Thu, 5 Jul 2007, Jeff King wrote:
>
>> status=`((cmd1; echo $? >&3) | cmd2) 3>&1`
>
> Cute.
>
> This is the replacement patch, then (I guess there are still some nits to 
> be had, so I did not redo the proper patch yet):
> ...
> +	(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 certainly meant "grep >&2 ." at the end of that pipeline;
while I welcome people to be aware that it is possible with
esoteric shell redirection games, I personally feel this is not
worth it.

-
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