git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: "Marc-André Lureau" <marcandre.lureau@gmail.com>,
	"SZEDER Gábor" <szeder.dev@gmail.com>,
	"Git List" <git@vger.kernel.org>
Subject: Re: [PATCH] branch: let '--edit-description' default to rebased branch during rebase
Date: Fri, 07 Feb 2020 12:14:29 -0800	[thread overview]
Message-ID: <xmqqpneq2lzu.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <CAPig+cTWxj+dRiYZEEbfUA7=NiEF3crTaYCVGPR2qG-VEV+Y0w@mail.gmail.com> (Eric Sunshine's message of "Fri, 7 Feb 2020 14:29:11 -0500")

Eric Sunshine <sunshine@sunshineco.com> writes:

>> > > How about teaching "git branch --edit-description [HEAD]" notice
>> > > when/if HEAD is detached and always error out, no matter what
>> > > operation is in progress?
>>
>> What I meant by "no matter what is in progress" is not to special
>> case "during rebase", either.
>
> That would defeat the original purpose[1] of this submission, I think.
> As I understand it, the idea all along was to make this operation work
> during a rebase.

I know.  But I do not think it is a good thing to begin with.

While you are rebasing the branch X and get control back before
rebase finishes, you are *not* on branch X.  You are *preparing* a
new version of the history leading to the tip of branch X, in the
hope that once you are done, you would make that new version of the
history the history of branch X.  Until that happens, you are not on
branch X.

If you were on branch X, then "git checkout -m another-branch"
followed by some other operations, and then finally coming back with
"git checkout -m X" would work.  But it would not, because you are
not on branch X.

After all, you may well say "git rebase --abort" before you are
done.  Would "edit description" you do in the middle be reverted
if you did so?

It is bad for the user to blur the distinction between "detached and
not on X but preparing to update X" and "working on X to advance X",
and I think the original patch that started the thread takes us in
that direction.

Thanks.

      reply	other threads:[~2020-02-07 20:14 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-11 12:35 [PATCH] branch: let '--edit-description' default to rebased branch during rebase marcandre.lureau
2020-01-11 13:26 ` Eric Sunshine
2020-01-11 14:54   ` Marc-André Lureau
2020-01-12  1:27     ` Eric Sunshine
2020-01-12  6:44       ` Marc-André Lureau
2020-01-12 12:14       ` SZEDER Gábor
2020-01-13  1:59         ` Eric Sunshine
2020-01-24 22:41           ` SZEDER Gábor
2020-01-30 21:37             ` Marc-André Lureau
2020-01-31 15:52               ` SZEDER Gábor
2020-01-31 15:59                 ` Marc-André Lureau
2020-01-31 16:16                   ` SZEDER Gábor
2020-02-06 22:26                     ` Marc-André Lureau
2020-02-07 10:02                       ` SZEDER Gábor
2020-02-07 14:16                         ` Marc-André Lureau
2020-02-07 18:57                           ` Junio C Hamano
2020-02-07 19:09                             ` Marc-André Lureau
2020-02-07 19:12                               ` Junio C Hamano
2020-02-07 19:29                                 ` Eric Sunshine
2020-02-07 20:14                                   ` Junio C Hamano [this message]

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=xmqqpneq2lzu.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=marcandre.lureau@gmail.com \
    --cc=sunshine@sunshineco.com \
    --cc=szeder.dev@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).