Re: [PATCHv3] filter-branch: Add more error-handling

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

 



Hi,

On Wed, 11 Feb 2009, Eric Kidd wrote:

> charon on #git helped with pipeline error handling.

JFYI charon is the nick of Thomas Rast.

> diff --git a/git-filter-branch.sh b/git-filter-branch.sh
> index 86eef56..27b57b8 100755
> --- a/git-filter-branch.sh
> +++ b/git-filter-branch.sh
> @@ -221,7 +221,7 @@ die ""
>  trap 'cd ../..; rm -rf "$tempdir"' 0
>  
>  # Make sure refs/original is empty
> -git for-each-ref > "$tempdir"/backup-refs
> +git for-each-ref > "$tempdir"/backup-refs || exit

I haven't checked, but is "$tempdir" not the working directory?  If so, 
this would lead to funny interaction with --tree-filter.  Rather, I'd 
write the file into "$GIT_DIR".  Likewise the other files.

> +test_must_fail 'Fail if commit filter fails' '
> +	git filter-branch -f --commit-filter "exit 1" HEAD
> +'
> +

That's not how it is supposed to be used.  Rather,

	test_expect_success $LABEL '
		test_must_fail git filter-branc $OPTIONS
	'

Thanks,
Dscho
--
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