Re: Using two-dot range notation in `git rebase`?

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

 



On Thu, Jul 29, 2021 at 10:58:15AM +0100, Philip Oakley wrote:

> In summary, there are two aspect:
> - first, being able to use a common short-form within the command, and
> - second, that the documentation's description includes rather too many
> tricky concepts to properly understand all the ramifications, leaving me
> to think "why can't I just say `git rebase --onto here old..end` or `git
> rebase --onto here start^..end` ? "

I do think "git rebase --onto here old..end" is a sensible thing to ask
for. If we were designing it today, I'd probably suggest that rebase
take arbitrary revision sets (and either require "--onto", or perhaps as
long as there is only one negative tip given, that becomes the "--onto"
point).

It might be possible to migrate to such a syntax, but we'd have to be
careful of ambiguities with the current syntax. It might be possible to
infer the intended use based on the presence or absence of negative tips
(so "git rebase foo bar" must be "foo is the upstream, and therefore
base branch", whereas "git rebase foo..bar" is a range, though the two
would do the same thing).

I think we did something similar with cherry-pick, which originally took
only a series of single commits.

I admit that I haven't thought carefully through the details, though.
There may be some gotchas in how "rebase" treats the base branch.

-Peff



[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