Article View: linux.kernel.git
Article #2027Re: [PATCH] sequencer: refuse to revert shallow boundary commits by default
From: Nakul V S
Date: Sat, 31 Oct 2026 17:29
Date: Sat, 31 Oct 2026 17:29
31 lines
11718 bytes
11718 bytes
Hi Junio, Thanks for the review, and for the question. > The next natural question is where the modification should go if we > want to make sure we protect these shallow boundaries not just from > revert but also from "cherry-pick", "rebase", and possibly "commit > --amend". Is sequencer.c:do_pick_commit() the right place to cover > all of them? No, it isn't. When I wrote v1 I was only thinking about "revert", since that is what the original thread was about. do_pick_commit() is where every pick and revert ends up, so it looked like the easiest place for a single check. I honestly didn't think about cherry-pick or rebase at that point, or about how late that is for the user. v2 moves it. The check now happens where each command builds its list of commits, and they all share one helper. "rebase --apply" doesn't go through the sequencer, so it gets a small check of its own before HEAD is touched. I've left "git commit --amend" alone for now. It is a different code path, so I'd rather do it as a separate patch than make this one bigger. Let me know if you'd prefer it in the same series. v2 is here: https://lore.kernel.org/git/pull.2273.v2.git.1793455522168.gitgitgadget@gmail.com Thanks, Nakul
Technical Details
Message-ID:
<20261031172900.69612-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-74026-linux-kernel-git=dewy.ruReferences:
<xmqqqzhina26.fsf@gitster.g>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-74026-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:59:00 +0530
Organization: Usenet Network
Message-ID: <20261031172900.69612-1-vsnakul@gmail.com>
References: <xmqqqzhina26.fsf@gitster.g>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
logging-data="2509552"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:FaaSTFc9RVQzvdaUbZtaQAqJVs4= sha256:U72+dCE76kEHZZRiJTwRp3oen7xRx4mqpam1kkR9Wq4=
sha1:TvqRD83HI4968PDaBCpvNMMc2tI= sha256:S7E8nmaTKgxfLxVQGGgVfFg5OKroIPIaa4wRZOgqsx0=
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 A46D9125CB9; Sat, 31 Oct 2026 20:29:26 +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 AqKx_YNX3BWC;
Sat, 31 Oct 2026 20:29:23 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=git+bounces-74026-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 8FF6F125CB6; Sat, 31 Oct 2026 20:29:14 +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 9FCB422B1B; Sat, 31 Oct 2026 17:29:11 +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=1793467749;
b=F+e9hc/D45U6ctVDNo6G35N+AJKfKArBX4ef6p0QASaQ0YAwRR0f9F9SlvB+L5B/6cVH
flKTf0oQFO3emkofguav07odWR12mqrfBLrmANrPCc20gDmmZYx8gVCjpGsbAddF+qlCT
Jq99lCUzTt7tmdMmoq3L5tjyJS7jQk27Hkns9IzaOMd4imTJa32pewi2KRXy/PqrKviyC
yBS27ZOPVA8eRtXcKUSc22SCdLnjer9vtc9yQTdyK1J8gcEAQBEM6QvKaIuKKyhsfO44i
beLf+t8zJhgh0D/Eews+n11eVYZRXDqCvlBcOc9ueyudRFXz/qTwu9OZ9cQ7ueYRXcw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1793467749;
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=cLxTBawN83QcwH3Yp5VdgahTWGw4zS443iSmc3mVatk=;
b=KAxPtunpFtIY208Sxg570ESG8Ao//Qh4igpi1JVy3Y1WN05zhLNPD9LsJzLxCl+2hTiN
+QjWjxddEFmNrezq3V/ncnpi4t91LNiShbuxKFjmhpW4rH/1x9txGWg8PtSt49FEnBKpu
WdXQr/1+FnCuDsqCv0993VRDtWZ+w0UAqF7bXb6AgHAXNUlygvtI16+/81jEwA64HJ6LL
xT1Sw0KA03GwXvv89bQ3wWDp8ZsN66nB1dQlYapjB61hYLVm2QbM8qWs7oowaVVALOLAZ
hNG3fZdeF5aC6oOsbUAZ7iR/75G/W/1AWq7N5hHFUkrQXNRcI3cneyhh4uFEfjvbMfQ==
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=hj7kZJsI;
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 2E78B606A325;
Sat, 31 Oct 2026 17:29:09 +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=hj7kZJsI
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.48
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1793467748;
b=SmAz6kFe8eB6v1B9t1RmuF6NkonUK6QEFVr7aegUdXGp9GYekl/YOaW+0YkK2iXJn8qc
wqS9YGuRDRuktdpjWgVENTy48R+yLH6ho4XSqSafpjp8OkTRia3MP/5tVuBqLhsEBgxGK
hcn2Gniwd30IPntvNnchkOOSyGqsP6p7juV4ygXVgkfrJOU3SNRZDxyLsTRYlE2PfInwr
gKDK8sx34EAfnOc+H2lYQNkcth6f8BwQauHukHKoW4P4dqmKMoRXmAkOfVTyFv+2b1pZe
+I8u/Cn6swJBMFCJVD693meBuEY5UNaR8HrxRzlk3+k0fOWX0Q2hLvS1E+IpW3cZ2+Q==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1793467748;
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=cLxTBawN83QcwH3Yp5VdgahTWGw4zS443iSmc3mVatk=;
b=r++pCRrT/AS2mzUDTXhEz8okOxEJM6LYJYSCsf2G1wSaS6fCgHwSlh57Fh3LdU5vu4xY
H+2A+rhyw7S+0Wou1Lg25Gkb7QbGWZbgQbOASXPY9P6S14FwfHQA2fCyE+J8Q185mlmDd
KDdpDG0PEERrSxslSBvfT8ohzXVJOVTdrBFsiGIeqNHtEjNKb9YrLoZxdYz5FUTFJb0sy
CCkBLx6Dtw6Im/RcuNacuGPAareV2h4Wf+KJCD9ED31mtvU0mqDE2txXWbFO7B9qWu7tb
D2PoCd0d/3yVs437uhWVF0uqhaPpnkOK+c2TIzv2SvFsjCQaEnMbdlsxylvygqCuQuQ==
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=hj7kZJsI;
arc=none smtp.remote-ip=74.125.82.48
X-Received: from mail-dl1-f48.google.com (mail-dl1-f48.google.com [74.125.82.48])
(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 E8821606A31A
for <git@vger.kernel.org>; Sat, 31 Oct 2026 17:29:07 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E8821606A31A
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-f48.google.com with SMTP id a92af1059eb24-15943c9c005so1263513c88.1
for <git@vger.kernel.org>; Sat, 31 Oct 2026 10:29:07 -0700 (PDT)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20260707; t=1793467747; x=1794072547; 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=cLxTBawN83QcwH3Yp5VdgahTWGw4zS443iSmc3mVatk=;
b=hj7kZJsI4hQIwJGDT6M5oWC+w9G6HOAMjPopIkkeGYjwEBTt5XfR3CBUhNbFEKfe1e
boQZym5eTEWEgeI5QA3yWEFkWgcAJ4nyQsoZuVOt5rEpvg/MJ3fl4xv7/WN6ozB/cRT7
VbEm4R5yUAyj+uOB56T8+OZpXHzBl0V8+gQLgXmOSLW+VqAf6amIqZ9l8jbSeU+WmHaC
MjSmScu9kgCwrmNGLjhDP4e3xxFu5JZj3DtmkGVY9aKYkkF9MZsC3obIrKTcgtcrMwdU
GydPUG0FcTABigkJvdNd7s0JR49R8wiAuUfDSs1pGZ5lWwE+kKpdVMK/ylVpCshjoiuq
zZmg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1793467747; x=1794072547;
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=cLxTBawN83QcwH3Yp5VdgahTWGw4zS443iSmc3mVatk=;
b=ae+j42SaM1ZdBoqVMe6Vgd9cIaqw2eg7PPAwIs+XO6ySRPIwWJQAL+PnxQlIlyCFZo
/3yfie2zl9J7/qaJi7Qy9+Hmbuz5yH+c7gmdzuCLKT1umKncjZijNCORC3ju3j3fCKF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41.1793467746842;
Sat, 31 Oct 2026 10:29:06 -0700 (PDT)
X-Received: from localhost.localdomain ([117.206.63.98])
by smtp.gmail.com with ESMTPSA id a92af1059eb24-1ac1b38ac58sm16845594c88.23.2026.10.31.10.29.03
(version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256);
Sat, 31 Oct 2026 10:29:06 -0700 (PDT)
X-Cc: git@vger.kernel.org,
phillip.wood123@gmail.com,
ps@pks.im,
gitgitgadget@gmail.com,
vsnakul@gmail.com
X-Mailer: git-send-email 2.50.1
X-In-Reply-To: <xmqqqzhina26.fsf@gitster.g>
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