git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Elijah Newren <newren@gmail.com>
Cc: Sami Boukortt <sami@boukortt.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: New git-rebase backend: no way to drop already-empty commits
Date: Tue, 07 Apr 2020 10:58:29 -0700	[thread overview]
Message-ID: <xmqqh7xvtby2.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <CABPp-BGFinonZJb2u_0-fX3y_UyJ1dY+O40oN0WAzZht0ddJ4w@mail.gmail.com> (Elijah Newren's message of "Tue, 7 Apr 2020 09:53:53 -0700")

Elijah Newren <newren@gmail.com> writes:

> Yes, from the manpage:
>
> ...
>
> and
>
> """
> Empty commits
> ~~~~~~~~~~~~~
>
> The apply backend unfortunately drops intentionally empty commits, i.e.
> commits that started empty, though these are rare in practice.  It
> also drops commits that become empty and has no option for controlling
> this behavior.

This is a very good illustration that shows why "switch the default
and retire the apply backend" deserves to be cooked for quite a long
time.  The 'apply' dropping empty commits may have looked like an
'unfortunate' thing to whoever wrote the above paragraph in the
documentation, but it clearly shows that person (me included) did
not think of the ramifications deeply enough that there may be valid
workflows that _depend_ on the behaviour.

As we will be dropping 'apply' that could be used as an escape
hatch, before we do so, we should teach the other backends an
alternate escape hatch to help those who have been depending on the
behaviour of 'apply' that discards the empty ones, whether they
become empty, or they are empty from the beginning.  I think the
"has contents originally but becomes empty" side is already taken
care of, so we'd need to make sure it is easy to optionally discard
the ones that are originally empty.

Thanks.

  parent reply	other threads:[~2020-04-07 17:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-07 16:30 New git-rebase backend: no way to drop already-empty commits Sami Boukortt
2020-04-07 16:53 ` Elijah Newren
2020-04-07 17:27   ` Sami Boukortt
2020-04-07 18:03     ` Elijah Newren
2020-04-07 18:16       ` Sami Boukortt
2020-04-07 18:29         ` Elijah Newren
2020-04-07 17:58   ` Junio C Hamano [this message]
2020-04-07 19:43     ` Bryan Turner
2020-04-07 19:45     ` Elijah Newren
2020-04-07 21:55       ` Junio C Hamano

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=xmqqh7xvtby2.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=newren@gmail.com \
    --cc=sami@boukortt.com \
    /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;
as well as URLs for NNTP newsgroup(s).