From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-a4-smtp.messagingengine.com (fhigh-a4-smtp.messagingengine.com [103.168.172.155]) (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 1C5D538E5DC for ; Thu, 27 Aug 2026 16:52:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.155 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787849570; cv=none; b=GDbt02Y6Pnsk0mqr3C7G0xC02vpohCMU+54C7Xo4xTCjVcuMia+AJRYl4EkLCq62EjgK7mt2XSpUjGMUaFQb1U5HmCYePY57l/j956O5jn5KEMAvrkP6iZULZvptzNtbEsTNZddxrdwKKLmFcq7Or5MhgC5NEJTZPh3xTA6skzw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787849570; c=relaxed/simple; bh=+ybcjmHF5JrKYDBRkRHTclaR1rJ8MElSWKvjEoIfAhc=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=Khvb04jcNRgK90+aT8RpGD1H0i538GHN5/wuSVOJ61TgXzq1Hoe4x5lUJJqWhz8G01cSFaZp2cg5vgKSEALpv/TMmMpPZ6M1vFVLBE73ggnqCUHWHWcU4UfZeZnPNO7TPNodqddevPdZGHJVrrW/h9lj6Jd+lXKLMipP2Hxp0FY= 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=Fw+WRDic; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=YhHuePfJ; arc=none smtp.client-ip=103.168.172.155 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="Fw+WRDic"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="YhHuePfJ" Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.phl.internal (Postfix) with ESMTP id 393DB14000F0; Thu, 27 Aug 2026 12:52:48 -0400 (EDT) Received: from phl-frontend-02 ([10.202.2.161]) by phl-compute-04.internal (MEProxy); Thu, 27 Aug 2026 12:52:48 -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=fm2; t=1787849568; x=1787935968; bh=uZnR/SR61B YRg2mEqpPA5iMYe6cpl3uX7nIBB2jZlqA=; b=Fw+WRDicXSUTbqUeZzfSFj5fH0 bWxIgQB0ojWkoP6OemxwDQ/++ybdbv+jTgHd6XO/PBvGMlGtwMkg8orMQb/IjNKq VjthOT2SAYlIkAHp7ZbXHw0/4XPZe7I9j0cHuVxxy70KUYNtZEwFHJv+JZMbQYO1 9YSr3RhNsC5XJ+gN11y9GnWIQitFDmuyM4dplBdDzbBgZXCgYrPcl/plm38NtXIM o21SirCNYwY97SM98GXKxpSmSV0IskebwsgDAKeQsQT+IVNwRR2KI326lC55nxXV /+oG1tseW9iDg6uhwjzbQ862mqy7fUKVxjCCOu309iBeusNQ72OTEDg7UzAw== 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=fm3; t= 1787849568; x=1787935968; bh=uZnR/SR61BYRg2mEqp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aKkSym8FbOPQbnpIVAlDTT5dPuQA X-ME-Proxy: Feedback-ID: if26b431b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 27 Aug 2026 12:52:47 -0400 (EDT) From: Junio C Hamano To: "Elijah Newren via GitGitGadget" Cc: git@vger.kernel.org, Phillip Wood , Elijah Newren Subject: Re: [PATCH v2 1/3] commit: reword the empty-commit rebase errors In-Reply-To: (Junio C. Hamano's message of "Thu, 27 Aug 2026 09:35:42 -0700") References: <65c48ed3cb638cf0be18a3aa6d86d4c4f2cf01a2.1787792534.git.gitgitgadget@gmail.com> Date: Thu, 27 Aug 2026 09:52:46 -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 Junio C Hamano writes: >> + die(_("cannot do a partial commit while resolving a commit that became empty.")); > > That is a mouthful. It also is awkward to say "while resolving a commit". This still stands, but I haven't come up with a better alternative yet. > More importantly, I am not sure if whence == FROM_REBASE_PICK at > this point in the code flow is a sufficient sign to tell that we > were not just in the middle of a rebase, not just a rebase stopped > with _some_ conflict, but the way the rebase stopped was because a > step in rebase resulted in a commit that is no-op relative to the > previous commit. What makes us certain that the rebase-pick is > empty? This confusion was because FROM_REBASE_PICK is a misleading name. sequencer_determine_whence() is the only place that declares the whence is FROM_REBASE_PICK, and it specifically checks if the rebase-head and cherry-pick-head are identical before yielding that value, so by definition we are dealing with an empty-pick situation. This came from 430b75f720 (commit: give correct advice for empty commit during a rebase, 2019-12-06); interestingly, the name of FROM_REBASE_PICK and is_from_rebase() seem to have confused even the originating commit ;-) The lines in question + else if (is_from_rebase(whence)) + die(_("cannot do a partial commit during a rebase.")); are from that commit, which wanted to "give correct advice for empty commit during a rebase". We may want to * change the code that does whence == FROM_REBASE_PICK to use is_from_rebase(whence) everywhere (other than the implementation of is_from_rebase() itself, of course). * give FROM_REBASE_PICK and is_from_rebase() better names that contain "empty" somewhere. to unconfuse me.