From: Nakul V S <vsnakul@gmail.com>
To: gitster@pobox.com
Cc: git@vger.kernel.org, phillip.wood123@gmail.com, ps@pks.im,
gitgitgadget@gmail.com, vsnakul@gmail.com
Subject: Re: [PATCH] sequencer: refuse to revert shallow boundary commits by default
Date: Sat, 31 Oct 2026 22:59:00 +0530 [thread overview]
Message-ID: <20261031172900.69612-1-vsnakul@gmail.com> (raw)
In-Reply-To: <xmqqqzhina26.fsf@gitster.g>
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
next prev parent reply other threads:[~2026-10-31 17:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-21 10:09 [PATCH] sequencer: refuse to revert shallow boundary commits by default Nakul V S via GitGitGadget
2026-10-21 15:20 ` Phillip Wood
2026-10-21 19:11 ` Junio C Hamano
2026-10-26 10:58 ` Phillip Wood
2026-10-31 17:22 ` Nakul V S
2026-10-31 17:29 ` Nakul V S [this message]
2026-10-31 17:18 ` Nakul V S
2026-10-31 14:05 ` [PATCH v2] sequencer: refuse to pick or revert shallow boundary commits Nakul V S via GitGitGadget
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261031172900.69612-1-vsnakul@gmail.com \
--to=vsnakul@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=gitster@pobox.com \
--cc=phillip.wood123@gmail.com \
--cc=ps@pks.im \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.