From: D. Ben Knoble Date: Mon, 28 Sep 2026 12:03:12 GMT Subject: Re: [PATCH v3 5/5] builtin/stash: merge index in-core Message-ID: In-Reply-To: On Mon, Sep 28, 2026 at 5:40 AM Junio C Hamano wrote: > > "D. Ben Knoble" writes: > > > + merge_incore_nonrecursive(&o, merge_base, head, merge, > > + &result); > > + > > + oidcpy(&index_tree, &result.tree->object.oid); > > This is risky, isn't it? > > If there were catastrophic failure (e.g., missing object that were > involved in the merge), merge_incore_nonrecursive() may stuff -1 to > result.clean and return without populating result.tree, and when > that happens, result.tree->object.oid would be dereferencing NULL. Indeed… unfortunate. Thanks for spotting. -- D. Ben Knoble