Fwd: [RFC/FR] Should "git checkout (-B|-b) branch master...branch" work?
- From
Martin von Zweigbergk <martinvonz@gmail.com>
- Date
- Dec 21, 2012, 16:55 UTC
- Message-ID
- <CANiSa6ibS7ORY=QMS3WQzXYJQQH4ZYvPO75qgLgv-oWGMSBBrw@mail.gmail.com>
- In-Reply-To
- <CANiSa6jP_JN+DpDgYpWA9Aky9REJvFq3aR3Yj0vF3+axWvtmsw@mail.gmail.com>
Oops, meant for all of you.
---------- Forwarded message ---------- From: Martin von Zweigbergk <martinvonz@gmail.com> Date: Fri, Dec 21, 2012 at 8:45 AM Subject: Re: [RFC/FR] Should "git checkout (-B|-b) branch master...branch" work? To: Junio C Hamano <gitster@pobox.com>
On Fri, Dec 21, 2012 at 7:58 AM, Junio C Hamano <gitster@pobox.com> wrote:
> $ git checkout -B branch <old fork point> > > Unfortunately, master...branch syntax does not seem to work for > specifying the "old fork point" for this purpose
I have personally always found it confusing to use the same syntax for specifying ranges/sets and single revisions. I keep forgetting what "git diff A..B" does. I know it doesn't do what I expect (i.e. "git diff $(git merge-base A B) B"), but I don't know what it does (maybe same as "git diff A B" (?), but that's besides the point). Having worked a bit on rebase, I know that $onto can also take the "A...B" form. So there is clearly some precedence for the "..." syntax to refer to a revision in some contexts. I would have much preferred if it was possible to make the revision parser generally interpret e.g. "A.^.B" as "the merge base of A and B" (failing if not exactly one). It seems like something that must have come up before. Is there a particular reason this would not be a good idea?