git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Philip Oakley <philipoakley@iee.email>,
	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 13:29:27 -0400	[thread overview]
Message-ID: <YQLldzh5OEY+mPLY@coredump.intra.peff.net> (raw)
In-Reply-To: <xmqqr1fh59go.fsf@gitster.g>

On Thu, Jul 29, 2021 at 10:13:59AM -0700, Junio C Hamano wrote:

> Jeff King <peff@peff.net> writes:
> 
> > long as there is only one negative tip given, that becomes the "--onto"
> > point).
> 
> So "git newbase [--options] A..B" would
> 
>  - checks if B names an existing branch or just a commit
> 
>  - detaches HEAD at commit A
> 
>  - replays commits in DAG A..B on top of it; the exact way the
>    history is replayed is affected by the options given (e.g. "-m"
>    and "-p" may try to preserve history shapes)
> 
>  - if B was determined to be a branch name, "git branch -f" to it;
>    otherwise leave the HEAD detached.
> 
> which all sounds OK, but I do not see a huge improvement over the
> current "git rebase [--options] A B" (other than that you can type
> double dot instead of a single space).

Yeah, I don't see it as a huge benefit either.

Potentially it opens the door for stuff like:

  git rebase ^A B C D

but I am not sure if that is helpful or horrifying. ;)

(To be clear, I am not necessarily advocating any of this, but just
thinking aloud of possibilities. And I'm definitely not planning to work
on it myself.)

-Peff

  reply	other threads:[~2021-07-29 17:29 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
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 [this message]
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=YQLldzh5OEY+mPLY@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=knittl89@googlemail.com \
    --cc=philipoakley@iee.email \
    /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).