git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] sequencer: honor --empty when a fixup!/squash! empties its target

From
YCYuxuan Chen <i@yuxuan.ch>
Date
Jul 10, 2026, 18:30 UTC
Message-ID
<20260710182937.716304-1-i@yuxuan.ch>
In-Reply-To
<afb76b98-661a-4663-8e8b-fd00572db5ba@gmail.com>
From: Yuxuan Chen <i@yuxuan.ch>
Hi Phillip,

I'm Yuxuan, and I work with Farid at Meta. Thank you for reviewing this patch. It addresses a workflow problem for us, and we appreciate your feedback.

Regarding
> Using an empty commit has a marker has the advantage that applying it cannot
> create conflicts, so you only have to deal with the conflicts caused by the
> commit being dropped, not the by fixup not applying cleanly.

I am concerned, however, that representing a `drop!` commit as an empty marker would be semantically unsound. We expect `rebase --autosquash` to drop the target commit, but until that rebase happens, the repository is not in a state where we consider the target commit dropped: the target's changes are still present, and the empty marker changes nothing. Therefore, I think a `drop!` commit should contain the inverse of the patch we intend to drop. That way, the repository state reflects the intended removal even before autosquash rewrites the history.

I recognize that applying the inverse patch may cause conflicts. However, this is not a new problem; `git revert` has the same issue when the inverse patch does not apply cleanly. Such conflicts reflect the actual difficulty of undoing the change at that point in the history.

Thanks, Yuxuan

Previous: Farid ZakariaNext: phillip.wood123@gmail.com
Message 4 of 7 in “sequencer: honor --empty when a fixup!/squash! empties its target”
  1. sequencer: honor --empty when a fixup!/squash! empties its targetFarid Zakaria, Jul 10, 2026
  2. Phillip WoodJul 10, 2026
  3. Farid ZakariaJul 10, 2026
  4. Yuxuan ChenJul 10, 2026
  5. phillip.wood123@gmail.comJul 13, 2026
  6. sequencer: honor --empty when a fixup!/squash! empties its targetFarid Zakaria, Aug 27, 2026
  7. Phillip WoodAug 31, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.