git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Philip Oakley <philipoakley@iee.email>
To: Jeff King <peff@peff.net>
Cc: Daniel Knittl-Frank <knittl89@googlemail.com>,
	Git List <git@vger.kernel.org>
Subject: Re: Using two-dot range notation in `git rebase`?
Date: Thu, 29 Jul 2021 15:11:43 +0100	[thread overview]
Message-ID: <1d730e32-a41e-73a6-5f20-70a652a9f6a2@iee.email> (raw)
In-Reply-To: <YQKBNXsMdroX3DfY@coredump.intra.peff.net>

On 29/07/2021 11:21, Jeff King wrote:
> 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).

Sensible.
>
> 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

My first though was to limit it to just the double-dot itself (rather
than waiting for it's conversion to using the negative ref notation),
but that may be at the wrong part of the command line decoding.

> (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.

My main issue (beyond the nice to have) is simply decoding all of the
documentation's terminology, which starts complex, and stays pretty
complicated... It is rather easy to mess up.

Philip

  reply	other threads:[~2021-07-29 14:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-28 15:38 Using two-dot range notation in `git rebase`? Philip Oakley
2021-07-28 16:33 ` Daniel Knittl-Frank
2021-07-29  9:58   ` Philip Oakley
2021-07-29 10:21     ` Jeff King
2021-07-29 14:11       ` Philip Oakley [this message]
2021-07-29 17:09       ` Junio C Hamano
2021-07-29 19:05         ` Sergey Organov
2021-07-29 17:13       ` Junio C Hamano
2021-07-29 17:29         ` Jeff King
2021-07-29 19:33           ` Junio C Hamano

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=1d730e32-a41e-73a6-5f20-70a652a9f6a2@iee.email \
    --to=philipoakley@iee.email \
    --cc=git@vger.kernel.org \
    --cc=knittl89@googlemail.com \
    --cc=peff@peff.net \
    /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).