Re: [PATCH] branch: let '--edit-description' default to rebased branch during rebase

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Eric Sunshine <sunshine@xxxxxxxxxxxxxx> 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.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux