git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Suggestion: rebase [--onto <newbase>] [<upstream>][..[<branch>]]

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 17, 2012, 20:17 UTC
Message-ID
<7vr4yyqe26.fsf@alter.siamese.dyndns.org>
In-Reply-To
<hbf.20120117gdfh@bombur.uio.no>
Hallvard Breien Furuseth <h.b.furuseth@usit.uio.no> writes:
Show 5 quoted lines
> I think
> 	git rebase [--onto <newbase>] [<upstream>][..[<branch>]]
> would be a more readable syntax for what rebase is doing.  Easier
> to see which argument means what without staring at the manpage.
> "..[<branch>]" without <upstream> implies --root.

I do not offhand see a huge issue if you come up with a patch that allows users to additionally say:

    $ git rebase upstream..topic
    $ git rebase --onto there upstream..topic
what they express with
    $ git rebase upstream topic
    $ git rebase --onto there upstream topic
today.

However, "git rebase ..topic" to mean "everything down to root from topic" is not OK; lack of one side in dotted range defaults to HEAD everywhere else and such a change will introduce a huge discrepancy.

Previous: Hallvard Breien Furuseth
Message 2 of 2 in “Suggestion: rebase [--onto <newbase>] [<upstream>][..[<branch>]]”
  1. Hallvard Breien FurusethJan 17, 2012
  2. Junio C HamanoJan 17, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.