Re: [PATCH v2] merge-tree: fix segmentation fault in read-only repositories
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Sep 22, 2022, 17:24 UTC
- Message-ID
- <322o3q9q-4559-63n5-9o56-q16463o3q7p6@tzk.qr>
- In-Reply-To
- <CABPp-BGUiDXxv8eQhKQXHcem3ke9e=Q99a_FDExZ5XZYUgir6A@mail.gmail.com>
Hi Elijah,
just quickly...
On Wed, 21 Sep 2022, Elijah Newren wrote:
Show 11 quoted lines
> On Wed, Sep 21, 2022 at 3:08 PM Johannes Schindelin via GitGitGadget > <gitgitgadget@gmail.com> wrote: > > > > @@ -473,7 +475,7 @@ static int real_merge(struct merge_tree_options *o, > > &result); > > } > > merge_finalize(&opt, &result); > > - return !result.clean; /* result.clean < 0 handled above */ > > + return !result.tree || !result.clean; /* result.clean < 0 handled above */ > > Thinking out loud, should this logic be at the merge-ort.c level,
You're right, of course. I have pushed up a tentative v3 that does it as you proposed, and it looks not half bad. I'll look a bit more deeply, still, but chances are that I'll submit this later today as v3 as-is.
And then I will reply a bit more verbosely, either ;-)
Ciao, Dscho