Subject: Re: [PATCH v4] replay: drop commits that become empty

From: Junio C Hamano <[email-masked]>
Date: Fri, 19 Dec 2025 13:44:36 +0900

Phillip Wood <[email-masked]> writes:

> From: Phillip Wood <[email-masked]>
> ...
> Helped-by: Elijah Newren <[email-masked]>
> Signed-off-by: Phillip Wood <[email-masked]>
> ---
> Changes since v3:
>
>  - dropped "--only" when creating an empty commit
>
> Changes since v2:
>
>  - added a couple of commas to the commit message as suggested by Junio
>
> Changes since v1:
>
>  - modified test to update refs as suggested by Elijah. I've kept
>    --ancestry-path --branches rather than switching to --contained as
>    I think it is useful to have test coverage for those options and it
>    means we can check that empty commits are dropped with out replying
>    on --contained working.
>
> This patch is based on ps/history
>
> I think dropping commits that become empty is the sensible default,
> if it turns out that some users are relying on the current behavior
> we can add an option to retain the empty commits.

Thanks.  Will replace.

But I am not sure what the next move for this topic would be, until
the base topic ps/history is sorted out.  There was a discussion
between "it is experimental, the early adopters should be prepared
that the behaviour can and will change" and "the behaviour being
questioned is so fundamental in the workflow, it is impossible to
fix retrospecitively".