git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Feb 11, 2009, 20:48 UTC
Message-ID
<alpine.DEB.1.00.0902112145400.10279@pacific.mpi-cbg.de>
In-Reply-To
<1234382600-7801-1-git-send-email-git@randomhacks.net>
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.
Show 10 quoted lines
> 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

Previous: Eric KiddNext: Eric Kidd
Message 9 of 13 in “git-filter-branch: Add more error-handling”
  1. git-filter-branch: Add more error-handlingEric Kidd, Feb 11, 2009
  2. Johannes SixtFeb 11, 2009
  3. Johannes SixtFeb 11, 2009
  4. Johannes SchindelinFeb 11, 2009
  5. filter-branch: Add more error-handlingEric Kidd, Feb 11, 2009
  6. Junio C HamanoFeb 11, 2009
  7. Eric KiddFeb 11, 2009
  8. [PATCHv3] filter-branch: Add more error-handlingEric Kidd, Feb 11, 2009
  9. Johannes SchindelinFeb 11, 2009
  10. Eric KiddFeb 11, 2009
  11. [PATCHv4] filter-branch: Add more error-handlingEric Kidd, Feb 11, 2009
  12. Nanako ShiraishiFeb 11, 2009
  13. Junio C HamanoFeb 11, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.