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

Re: [PATCH v2] filter-branch: Add more error-handling

From
EKEric Kidd <git@randomhacks.net>
Date
Feb 11, 2009, 19:34 UTC
Message-ID
<431341160902111134l7c289412r5b3f633280beb27c@mail.gmail.com>
In-Reply-To
<7vhc30eqy7.fsf@gitster.siamese.dyndns.org>
On Wed, Feb 11, 2009 at 2:03 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 10 quoted lines
>> @@ -339,7 +339,8 @@ while read commit parents; do
>>               eval "$filter_msg" > ../message ||
>>                       die "msg filter failed: $filter_msg"
>>       @SHELL_PATH@ -c "$filter_commit" "git commit-tree" \
>> -             $(git write-tree) $parentstr < ../message > ../map/$commit
>> +             $(git write-tree) $parentstr < ../message > ../map/$commit ||
>> +                     die "could not write rewritten commit"
>
> Hmm, wouldn't commit-tree have issued its own error message already?  If
> redirect failed, then the shell would have.

If a custom $filter_commit calls 'exit', there won't be an error message from git. Of course, there may be an error message from the custom $filter_commit, but I decided not to rely on that. Would you prefer me to remove the error message?

I'll have another patch ready shortly, incorporating your suggestions. My apologies for giving credit in the wrong part of the commit message, and thank you for your feedback!

Cheers, Eric

Previous: Junio C HamanoNext: Eric Kidd
Message 7 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.