Re: [PATCH v4 2/2] merge-ort: return early when failing to write a blob
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 26, 2022, 22:07 UTC
- Message-ID
- <xmqq5yh9bxhd.fsf@gitster.g>
- In-Reply-To
- <087207ae0b0932fcec9aa25e97bbe9227eff81cb.1664229348.git.gitgitgadget@gmail.com>
"Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 9 quoted lines
> From: Johannes Schindelin <johannes.schindelin@gmx.de> > > In the previous commit, we fixed a segmentation fault when a tree object > could not be written. > > However, before the tree object is written, `merge-ort` wants to write > out a blob object (except in cases where the merge results in a blob > that already exists in the database). And this can fail, too, but we > ignore that write failure so far.
Nice find.
As long as we create at least one "new" blob the repository has not seen, we have a chance to exit before we attempt to write a tree object (and notice a failure). Checking the return value of process_entry() for failures is a good thing to do.
Will replace. Thanks.