Re: [PATCH v2] filter-branch: Add more error-handling
- From
- Eric 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