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

Re: [PATCH 3/3] rebase: use peel_committish() where appropriate

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
Jun 15, 2013, 13:47 UTC
Message-ID
<CALkWK0k5jgafQa6b5=_d2vTT1zzdc4rCgzuoFhOCA1Xtm8v19w@mail.gmail.com>
In-Reply-To
<7vmwqspr52.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
Show 9 quoted lines
> You can also specify the commit at the end of the history to be
> rebased (very useful while trial runs to see where a series should
> apply):
>
>     git rebase foo ":/Add B"
>
> This is already handled properly because it first gets turned into
> an object name $orig_head and then we use it (without ^0) to update
> the ORIG_HEAD.
Correct, but what sense does it make unless <branch> is a ref to update?
  $ git rebase master :/v1.8.1
  First, rewinding head to replay your work on top of it...
  Fast-forwarded :/v1.8.1 to master.
Huh?  The message is wrong, and no end-user can figure out what happened.
Show 6 quoted lines
> Even after this patch, there is
>
>         git checkout -q "$onto^0"
>
> when detaching the HEAD to that commit.  Can that peeling be dropped
> now (I am not suggesting to drop it in this patch)?
Yeah, that can be dropped.
> What would happen when you are given "--onto :/f...o" is somewhat
> interesting, but that may be a separate topic, I think.  At that
> point, it is probably in the realm of "don't do it then" ;-)

The utility of this very series can be questioned. I've rarely wanted to use the :/fommery with rebase, so this mostly an exercise in "theoretical correctness" (something I usually stay away from).

Previous: Junio C HamanoNext: Junio C Hamano
Message 9 of 10 in “Get rebase to work with :/foomery committish”
  1. 0/3 Get rebase to work with :/foomery committishRamkumar Ramachandra, Jun 14, 2013
  2. 1/3 t/rebase: add failing tests for a peculiar revisionRamkumar Ramachandra, Jun 14, 2013
  3. 2/3 sh-setup: add new peel_committish() helperRamkumar Ramachandra, Jun 14, 2013
  4. Philip OakleyJun 14, 2013
  5. Ramkumar RamachandraJun 14, 2013
  6. Philip OakleyJun 14, 2013
  7. 3/3 rebase: use peel_committish() where appropriateRamkumar Ramachandra, Jun 14, 2013
  8. Junio C HamanoJun 14, 2013
  9. Ramkumar RamachandraJun 15, 2013
  10. Junio C HamanoJun 17, 2013

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.