Article View: linux.kernel.git
Article #2025Re: [PATCH] sequencer: refuse to revert shallow boundary commits by default
From: Nakul V S
Date: Sat, 31 Oct 2026 17:22
Date: Sat, 31 Oct 2026 17:22
35 lines
12065 bytes
12065 bytes
Hi Phillip, > From the user's point of view, I think do_pick_commit() is a bit late > to error out. It would be nicer to refuse to add a shallow commit to > the todo list in the first place which means we'd need a helper > function that's called from sequencer_make_script(), > make_script_with_merges(), single_pick() and > sequencer_pick_revisions(). You're right, and I hadn't thought about it from the user's side. I tried "git revert <tip> <boundary>" with v1. It reverted the tip, made a commit, then failed on the boundary and left .git/sequencer behind. That's a messy state to be left in. So v2 does what you describe. The check is made where each command builds its list of commits, and they all call the one helper. If any of the commits is a boundary, the command refuses up front: no commit is created, HEAD doesn't move, and there is nothing to abort. "rebase --apply" doesn't go through the sequencer, so it gets a small check of its own before it rewinds HEAD. That check does nothing in a repository that isn't shallow. One thing to be aware of: if someone types a "pick" or "revert" line for a boundary commit into the rebase todo list by hand, it won't be caught, because the check runs when the list is generated and not after the editor. Git doesn't catch that today either, and the person would have to type the hash on purpose, so I think it's an acceptable price for failing early. If you'd prefer, I can add a second check in do_pick_commit() as well. Thanks, Nakul
Technical Details
Message-ID:
<20261031172238.66306-1-vsnakul@gmail.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-74024-linux-kernel-git=dewy.ruReferences:
<235e7dcd-2d29-47e4-b68f-9b02f80085dd@gmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-74024-linux-kernel-git=dewy.ru
From: vsnakul@gmail.com (Nakul V S)
Newsgroups: linux.kernel.git
Subject: Re: [PATCH] sequencer: refuse to revert shallow boundary commits by default
Date: Sat, 31 Oct 2026 22:52:38 +0530
Organization: Usenet Network
Message-ID: <20261031172238.66306-1-vsnakul@gmail.com>
References: <235e7dcd-2d29-47e4-b68f-9b02f80085dd@gmail.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
logging-data="2508465"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:Rv/UZfd4oYgoib7Lml/d3mMhetU= sha256:eoBU4PU5T/luL7YtHbbuNWVJmMm+4UnyZo27NGbbS+w=
sha1:qHGsg1yDARJgFmH/3pAxDx0KB0c= sha256:eIO8Q4VwSF2a/d3XZ1ewLFY4eR0NLIYtxaH7ou0KcUA=
List-ID: <git.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
by mail.dewy.ru (Postfix) with ESMTP id D2EDE125CB6; Sat, 31 Oct 2026 20:23:12 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.048
X-Spam-Status: No, score=-3.048 tagged_above=-9999 required=6.31
tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001,
FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25,
MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
header.d=gmail.com
X-Received: from mail.dewy.ru ([127.0.0.1])
by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id uS8mauqwWL1e;
Sat, 31 Oct 2026 20:23:05 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=git+bounces-74024-linux-kernel-git=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])
by mail.dewy.ru (Postfix) with ESMTPS id 4046B125CB5; Sat, 31 Oct 2026 20:22:56 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by sin.lore.kernel.org (Postfix) with ESMTP id A4CBA23085; Sat, 31 Oct 2026 17:22:50 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1793467368;
b=yoHamPcqRhRyehxSQTh9evTdFEWwpaXaOK0ubuyNjQysw7qKbmx4JS5tF5R90UxEWC5X
YNwLiYn1rT7U50YGvteAbpYB+yjx1GOxFkVWcLBFCZHWcMHJHPztdrAI6QTBKKhpEOkzz
jcq4NxcMK8ZajQ3xgMD7ljJNHP+iv36Eiew6lsM5/lIiHmz1NFiTE8e5wDhSo936Wlv7f
mtmv0gmxELNxojT0RaT1Zfx2coviYjXnMZtcwQyY8yP/DrPC5+/6+lfgRzmOEPgyPtw1a
o4YJd4WelQiuazAQlLrCHFlCjKP+o0pCTF/rEl6rRFCvkGQhVBXW8FZQXRH4DOd+srg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1793467368;
h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received:
Received:From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:
References:X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
List-Unsubscribe:List-Owner:Precedence:MIME-Version:
Content-Transfer-Encoding;
bh=eltmB5OoKgy3bLrHLeFRh/hpvMIjtYRtwlzdwljJMkA=;
b=L4p8fwJtSMdQ6Qn93xaSeGsWTRjMmuz3yLBq2WCNndSmtXeZbScOl9SRNtr4z/4RjgRs
5iZl7Fz4ChaB8n6+beBO+9i3HtwEJc91dfH8Txh5WDarJrA51NFw/PW2eBHGPdZoMX7gf
BIkgfdlUZooZlj4TPhEmhq2nze1BU9ZDTSXvNtjmQnY0SZw0uoUAqHxHAUW1Js+ODPiRH
LoIR1JZ0bYDLn41mJy+QNeO0g7i2xLuPi13YSNdJ7qlZmOzK9NSa4CPm//tcvNaEdwqt6
YneytKsa43ZO4RQHCRPlIHwT+StftCCwe6FqQ7j57HF1Mh8x/SUhQPuILArJ5N0FEqQ==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=EIunOiTC;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 03FA3606A31E;
Sat, 31 Oct 2026 17:22:48 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=EIunOiTC
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.42
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1793467367;
b=3ppQUJotsoPb62aS0yYBtISNE/Q6D+pz4pjRhEPegTwpjMHy/+2lIv15D9Ik1FVqPstR
a5yHc+1Y7rS2xAuKaEeTy07XZNjnJjMp9J5WnfbNDGsSAtRHNJGZE6epIyAleqN5Q5fy3
7bex56gKbteZ+XBUPHt6K/Q/DPh5sP2rMO0jJUyrO6xyYVKfTzcZo7UlwWFxgSewk7Xoh
zHUMAGNiTfr0Zk1DwPLgN8eLqf/HcFnD3GcJx7yMeYaFGcuR6bKevknTEAA/ot/tdJimb
sJYS6995AumQ5mic+5lshR6oK4wgxb2fWbusTUY/buwAHxGUFfZDGsEyy450X7ix3Mg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1793467367;
h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject:
Date:Message-ID:X-Mailer:In-Reply-To:References:MIME-Version:
Content-Transfer-Encoding;
bh=eltmB5OoKgy3bLrHLeFRh/hpvMIjtYRtwlzdwljJMkA=;
b=FkkqCuoApObM6TFIKxNfb6F7zhr1wxUiKh5ZT7Zm0grDQD79CdUmr16xleZRsrwN7kLo
BaDhhXtYGkGRX3lsUSTxEca2UZ05u6XOweoH6F9CYTXvC5YTQinf3lT17bsDzL0jBimlb
O4DD592N8jekhFFL3Wkav9tp/e81IoSgSIGyAwRDWbU+METJAz6CC3NPpILusF6ES9Kdz
vToXiByD5oC0VZzmPaHwFyKEwJ3H68mLptEkVCIvkJZnd8w7MZIlXNxbEgaF1NoT9cGad
0lZjVBa4fB3fsyUTs0D9Dgg86f6q53p/thaAExHq5NpuZrp8JMprJFSzqW/rC8Ga9qQ==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=EIunOiTC;
arc=none smtp.remote-ip=74.125.82.42
X-Received: from mail-dl1-f42.google.com (mail-dl1-f42.google.com [74.125.82.42])
(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id C540A606A31A
for <git@vger.kernel.org>; Sat, 31 Oct 2026 17:22:46 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org C540A606A31A
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-dl1-f42.google.com with SMTP id a92af1059eb24-15dd124bbe7so1372392c88.1
for <git@vger.kernel.org>; Sat, 31 Oct 2026 10:22:46 -0700 (PDT)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20260707; t=1793467366; x=1794072166; darn=vger.kernel.org;
h=content-transfer-encoding:mime-version:references:in-reply-to
:message-id:date:subject:cc:to:from:from:to:cc:subject:date
:message-id:reply-to:content-type;
bh=eltmB5OoKgy3bLrHLeFRh/hpvMIjtYRtwlzdwljJMkA=;
b=EIunOiTCh6J7t9UFN5KUZFKjwpYUJ1Xd5VCpoldNS/xw//FReLMGM4XxwDlKFkoEf8
CtgHAKC2RHiFqVHTDxiDP7xXD6+zEYXifLaDsVsInk+XuwuJa3Euoe1w+Gum7t3SI5Tm
x++J6kF5qJsiVmqc5syMJrs1nYBVzHDn757Wj2a4YGNRCWZxnk2RZBdFgz9Ci7bxdpea
JHqgqAvx/q4Ji36F2YwOzSv2ZQZmw3Aq9+nUDnZV785zn432gdrmJSD1s8IcOq7fabRZ
r+oLsuDzWctQ3IhQ9ouzsVw8HdxKcC4wBBxTsmlDhjxMNp/tsOD1sjrjz5GjBzwJlTIc
FT6A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1793467366; x=1794072166;
h=content-transfer-encoding:mime-version:references:in-reply-to
:message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from
:to:cc:subject:date:message-id:reply-to:content-type;
bh=eltmB5OoKgy3bLrHLeFRh/hpvMIjtYRtwlzdwljJMkA=;
b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g5mrKeD0fUYuex96S3MRQSecGAgv
ORWNXgwqmSRV10ExGj+SUkxg81TNQw4HsCch4X5+CUqaDfF1esM7uQ==
X-Received: by 2002:a05:7022:ed09:b0:17d:7b45:f927 with SMTP id a92af1059eb24-1ac5c2727e4mr7434814c88.33.1793467365667;
Sat, 31 Oct 2026 10:22:45 -0700 (PDT)
X-Received: from localhost.localdomain ([117.206.63.98])
by smtp.gmail.com with ESMTPSA id a92af1059eb24-1ac194b5437sm19703754c88.13.2026.10.31.10.22.42
(version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256);
Sat, 31 Oct 2026 10:22:45 -0700 (PDT)
X-Cc: git@vger.kernel.org,
gitster@pobox.com,
ps@pks.im,
phillip.wood@dunelm.org.uk,
gitgitgadget@gmail.com,
vsnakul@gmail.com
X-Mailer: git-send-email 2.50.1
X-In-Reply-To: <235e7dcd-2d29-47e4-b68f-9b02f80085dd@gmail.com>
X-Mailing-List: git@vger.kernel.org
X-List-Post: <mailto:git@vger.kernel.org>
X-List-Help: <mailto:git+help@vger.kernel.org>
X-List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:git+owner@vger.kernel.org>
X-Precedence: list