Thread (10 messages) 10 messages, 4 authors, 21h ago

Re: [PATCH] sequencer: refuse to revert shallow boundary commits by default

flat view

From: Nakul V S <hidden>
Date: 2026-10-31 17:29:07

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 (local)

Thanks,
Nakul
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help