From: Johannes Schindelin Date: Thu, 22 Sep 2022 17:24:14 GMT Subject: Re: [PATCH v2] merge-tree: fix segmentation fault in read-only repositories Message-ID: <322o3q9q-4559-63n5-9o56-q16463o3q7p6@tzk.qr> In-Reply-To: Hi Elijah, just quickly... On Wed, 21 Sep 2022, Elijah Newren wrote: > On Wed, Sep 21, 2022 at 3:08 PM Johannes Schindelin via GitGitGadget > 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