git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Bryan Turner <bturner@atlassian.com>
Cc: Elijah Newren via GitGitGadget <gitgitgadget@gmail.com>,
	Git Users <git@vger.kernel.org>,
	phillip.wood123@gmail.com,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Elijah Newren <newren@gmail.com>
Subject: Re: [PATCH] rebase -i: mark commits that begin empty in todo editor
Date: Thu, 09 Apr 2020 21:57:08 -0700	[thread overview]
Message-ID: <xmqqeeswkkez.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <CAGyf7-H4jtnVjgZ20qC-mzJHRd7Ffqm=Vh18wJPiiSS4NPnhyQ@mail.gmail.com> (Bryan Turner's message of "Thu, 9 Apr 2020 19:06:42 -0700")

Bryan Turner <bturner@atlassian.com> writes:

>> So, from that point of view, this may not be enough, but a "throw
>> away all" option is not enough, either.  We'd want to have both to
>> serve such users better.
>
> This was why I wondered whether it might be worth extending the
> --empty option to add another possible value, like "drop-all", that
> would allow the caller to say they want to drop all empty
> commits--both those that started out empty and those that became
> empty.

You are talking about "empty from the beginning" and "has become
empty due to rebasing", but the use case you quoted and responding
to is not about the distinction between those two.

The original scenario that triggered this thread was to clean a
history the user created with git-imerge.  Part of using the tool,
apparently, you can choose to leave empty commits the tool
internally needs to create.  To the "git rebase" command that is
tasked to clean up the history, an empty commit that was left due to
what imerge did, and an empty commit that was originally created by
the end user (perhaps deliberately in order to server as some sort
of a marker) look the same---they both are "empty from the
beginning", not "commits that became no-op as the result of
rebasing".

And in order to help manually sift these two apart, " # empty"
marker would help, as there are three kinds of "pick" in the
instruction stream.  Commits that are not no-op (i.e. without the 
" # empty" mark), commits that imerge made no-op (the user wants
to get rid of) and commits that are no-op because the user wanted
them to be.  The latter two classes would be marked with " # empty"
and the user can selectively apply s/pick/drop/ to them.

  reply	other threads:[~2020-04-10  4:57 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-09 23:26 [PATCH] rebase -i: mark commits that begin empty in todo editor Elijah Newren via GitGitGadget
2020-04-10  0:50 ` Junio C Hamano
2020-04-10  2:06   ` Bryan Turner
2020-04-10  4:57     ` Junio C Hamano [this message]
2020-04-10 17:51 ` [PATCH v2 0/3] " Elijah Newren via GitGitGadget
2020-04-10 17:51   ` [PATCH v2 1/3] " Elijah Newren via GitGitGadget
2020-04-10 17:51   ` [PATCH v2 2/3] rebase: reinstate --no-keep-empty Elijah Newren via GitGitGadget
2020-04-10 20:37     ` Junio C Hamano
2020-04-10 21:41       ` Elijah Newren
2020-04-10 17:51   ` [PATCH v2 3/3] rebase: fix an incompatible-options error message Elijah Newren via GitGitGadget
2020-04-10 20:42   ` [PATCH v2 0/3] rebase -i: mark commits that begin empty in todo editor Junio C Hamano
2020-04-10 21:04     ` Junio C Hamano
2020-04-10 21:14       ` Junio C Hamano
2020-04-10 22:11         ` Elijah Newren
2020-04-10 21:29     ` Junio C Hamano
2020-04-10 22:13       ` Elijah Newren
2020-04-10 22:30         ` Junio C Hamano
2020-04-11  0:07           ` Elijah Newren
2020-04-11 21:14             ` Junio C Hamano
2020-04-11  2:44   ` [PATCH v3 0/4] " Elijah Newren via GitGitGadget
2020-04-11  2:44     ` [PATCH v3 1/4] " Elijah Newren via GitGitGadget
2020-04-15 20:52       ` Junio C Hamano
2020-04-11  2:44     ` [PATCH v3 2/4] rebase: reinstate --no-keep-empty Elijah Newren via GitGitGadget
2020-04-11  2:44     ` [PATCH v3 3/4] rebase: fix an incompatible-options error message Elijah Newren via GitGitGadget
2020-04-11  2:44     ` [PATCH v3 4/4] rebase --merge: optionally skip upstreamed commits Jonathan Tan via GitGitGadget
2020-04-11 18:12       ` Jonathan Tan
2020-04-14  9:11     ` [PATCH v3 0/4] rebase -i: mark commits that begin empty in todo editor Phillip Wood
  -- strict thread matches above, loose matches on Subject: below --
2020-04-10 17:25 [PATCH] " Lia Rosas

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqeeswkkez.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=bturner@atlassian.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=newren@gmail.com \
    --cc=phillip.wood123@gmail.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).