All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Farid Zakaria <farid.m.zakaria@gmail.com>
Cc: git@vger.kernel.org,  Phillip Wood <phillip.wood@dunelm.org.uk>,
	 Elijah Newren <newren@gmail.com>,
	 Patrick Steinhardt <ps@pks.im>
Subject: Re: [PATCH v3] sequencer: honor --empty when a fixup!/squash! empties its target
Date: Sat, 11 Jul 2026 22:01:26 -0700	[thread overview]
Message-ID: <xmqqh5m494yh.fsf@gitster.g> (raw)
In-Reply-To: <20260711-fz-autosquash-empty-v3-1-d227b63eb511@gmail.com> (Farid Zakaria's message of "Sat, 11 Jul 2026 17:38:26 -0700")

Farid Zakaria <farid.m.zakaria@gmail.com> writes:

> When "git rebase --autosquash" melds a "fixup!" or "squash!" commit into
> its target, the result can be a commit that no longer changes anything
> relative to its parent, for example when the melded change reverts the
> target.  Rather than dropping or keeping this empty commit, the rebase
> stops with
>
> 	You asked to amend the most recent commit, but doing so would
> 	make it empty. ...
>
> and the "--empty" option has no effect on it.  This makes backing a
> change out of a series awkward: reverting a commit as a "fixup!" and
> running "git rebase --autosquash --empty=drop" ought to remove both the
> commit and its revert, but it halts instead.
> ...
> Changes in v3:
>  * Switch the new tests' assertions from grep to test_grep for better
>    diagnostics (per review).
>  * Link to v2: https://lore.kernel.org/r/20260710-fz-autosquash-empty-v2-1-fa1e277e05f8@gmail.com

I see you are already working well with Phillip, which is great.

This topic, when merged to 'seen', seems to have quite a lot of
overlaps with his pw/rebase-drop-notes-with-commit topic.  We are
expecting the topic to be rerolled, and I was under the impression
that the remaining issues in that topic were all minor (Phillip,
correct me if I am wrong) and hopefully we will see it in 'next'
not in so distant future.

So it might make sense for you to coordinate with Phillip, and wait
for his topic to be merged to 'next'.  After that happens, you would
prepare a merge commit of the other branch into f85a7e6620 (Start
Git 2.56 cycle, 2026-07-06) or some other stable point, and rebuild
this patch on top of it.  That way, it will be much less likely that
I'd make stupid and unnecessary mismerges when attempting to
integrate this topic into my tree.

Thanks.

  reply	other threads:[~2026-07-12  5:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-12  0:38 [PATCH v3] sequencer: honor --empty when a fixup!/squash! empties its target Farid Zakaria
2026-07-12  5:01 ` Junio C Hamano [this message]
2026-07-13 13:18   ` Phillip Wood
2026-07-13 16:30     ` Farid Zakaria

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=xmqqh5m494yh.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=farid.m.zakaria@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=newren@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 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.