From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-b3-smtp.messagingengine.com (fhigh-b3-smtp.messagingengine.com [202.12.124.154]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8CB2B3CAA55 for ; Tue, 29 Sep 2026 20:07:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.154 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790712427; cv=none; b=gHX8VMOVZbzdWyA24V3uBaGGuFqsSBTJnXZDr/w1jR9cxJCFL5w+1HVyIo5hfLiPSLkgXw/WON7dMNUUlh4JJU7//z+zuOzWVB6wgNkZFAxJ5zhGCn920hyWAficzTYLROF+PPxC9eAKZtTy6c4Txj5cY9Ow+FA8Z/Cf9Goo5s4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790712427; c=relaxed/simple; bh=ogJAtHh3C33N5zdS6OWelCRKkaK/7nzGwudbWKIvE+o=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=uxAWoLtoFOZS8UDmO4C3zGParzHsq+G28LrV1Q7duOSXiOf0DPlsJyO6m0mKJezP5/DIpd1t3IB2KihScor9GaBTQXn4xYRCbnB45kl4VJiDFg97iOr0KqQ1pSo7D1jm4cc41vgtd9r6Q5LeJuKaJw2du22Pbu4ADa3skBdFL/Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com; spf=pass smtp.mailfrom=pobox.com; dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b=XB8QE6S0; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=vhwxoRAM; arc=none smtp.client-ip=202.12.124.154 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pobox.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b="XB8QE6S0"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="vhwxoRAM" Received: from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43]) by mailfhigh.stl.internal (Postfix) with ESMTP id 7C6EC7A076B; Tue, 29 Sep 2026 16:07:05 -0400 (EDT) Received: from phl-frontend-01 ([10.202.2.160]) by phl-compute-03.internal (MEProxy); Tue, 29 Sep 2026 16:07:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pobox.com; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1790712425; x=1790798825; bh=cNTpmkw0xs ySu4WEKeCd/joFir+OK+NDN4Srlve/aDQ=; b=XB8QE6S0DR5dFgndpdWPbCwI1P bMplS2AgkrEGacXUZU3fAWbl7A647PcQYNwoG2bEojfcaklieL4R9v4Z6qlcuUnI 4h8W6LrvV8xOv0HNeXeyQUTac52v99/hL5GZ0vMkN71ZG9sbwNov9A8O/aFZFoO1 sIkaPi5kmfYytTJG/c9pta+beMMFnOyYGvmBjaXUI9y+tTYjD0CIeCQgfoOCFtvD eCVFbhpNKBpATtUOzRCR4Tp93mmUWVnaPbmiQl7Tk7zD2MWQiybByP6QPQhdsENV HdAFHNo4Y/Dfat4broJCGY5BcW/L5CiHZC/SNhTBLkT48kr/Ux43/POd+qQA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1790712425; x=1790798825; bh=cNTpmkw0x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Lm+98g3S+LtX02ynxYeVLW66akHt5kmZBdy6qcFofQXsOGUVA X-ME-Proxy: Feedback-ID: if26b431b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 29 Sep 2026 16:07:03 -0400 (EDT) From: Junio C Hamano To: "D. Ben Knoble" Cc: git@vger.kernel.org, Eli Barzilay , Phillip Wood , Patrick Steinhardt , =?utf-8?B?w4Z2YXIgQXJuZmrDtnLDsA==?= Bjarmason , Elijah Newren , Jeff King , Victoria Dye , Adam Johnson Subject: Re: [PATCH v4 5/5] builtin/stash: merge index in-core In-Reply-To: (D. Ben Knoble's message of "Tue, 29 Sep 2026 08:18:31 -0400") References: Date: Tue, 29 Sep 2026 13:07:02 -0700 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain "D. Ben Knoble" writes: > + merge_incore_nonrecursive(&o, merge_base, head, merge, > + &result); In a hard error from merge_incore_nonrecursive(), result->clean is set to -1, which means that ... > + if (!result.clean) { ... "result.clean is false" is not true here, so we will ... > + merge_finalize(&o, &result); > return error(_("conflicts in index. " > "Try without --index.")); > + } else { ... come here to access result.tree member, no? > + oidcpy(&index_tree, &result.tree->object.oid); > + merge_finalize(&o, &result); > + } IOW, shouldn't it be more like three-way check, if (result.clean < 0) { merge_finalize(&o, &result); return error(_("index merge failed.")); } else if (!result.clean) { merge_finalize(&o, &result); return error(_("conflict in index merge.")); } else { ... happy path ... } or something like that?