Git development
 help / color / mirror / Atom feed
From: Yuxuan Chen <i@yuxuan.ch>
To: "phillip.wood123@gmail.com" <phillip.wood123@gmail.com>
Cc: "farid.m.zakaria@gmail.com" <farid.m.zakaria@gmail.com>,
	"git@vger.kernel.org" <git@vger.kernel.org>,
	"gitster@pobox.com" <gitster@pobox.com>,
	"newren@gmail.com" <newren@gmail.com>,
	"phillip.wood@dunelm.org.uk" <phillip.wood@dunelm.org.uk>,
	"ps@pks.im" <ps@pks.im>, Yuxuan Chen <i@yuxuan.ch>
Subject: Re: [PATCH] sequencer: honor --empty when a fixup!/squash! empties its target
Date: Fri, 10 Jul 2026 18:30:14 +0000	[thread overview]
Message-ID: <20260710182937.716304-1-i@yuxuan.ch> (raw)
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

  parent reply	other threads:[~2026-07-10 18:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-10  4:13 [PATCH] sequencer: honor --empty when a fixup!/squash! empties its target Farid Zakaria
2026-07-10 13:28 ` Phillip Wood
2026-07-10 16:42   ` Farid Zakaria
2026-07-10 18:30   ` Yuxuan Chen [this message]
2026-07-13 13:18     ` phillip.wood123

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=20260710182937.716304-1-i@yuxuan.ch \
    --to=i@yuxuan.ch \
    --cc=farid.m.zakaria@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=newren@gmail.com \
    --cc=phillip.wood123@gmail.com \
    --cc=phillip.wood@dunelm.org.uk \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox