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

Re: help reproduce fast-forward in rebase

From
Johannes Sixt <j.sixt@viscovery.net>
Date
May 20, 2009, 09:26 UTC
Message-ID
<4A13CCD7.5090900@viscovery.net>
In-Reply-To
<fcaeb9bf0905200113s43eb5693l24a1f8848bafabd2@mail.gmail.com>
Nguyen Thai Ngoc Duy schrieb:
> Hi,
> 
> I'm rewriting rebase in C and do not quite understand this code inside
> git-rebase.sh

One thing that has annoyed me sometimes is that 'git rebase --cont' works only after 'git rebase -i' but not after plain 'git rebase'. The reason is that the two instances of rebase do their own argument parsing, and the interactive version uses rev-parse --parseopt, and normal rebase does not. I hope you will rectify this situation.

Show 10 quoted lines
> # If the $onto is a proper descendant of the tip of the branch, then
> # we just fast forwarded.
> if test "$mb" = "$branch"
> then
> 	echo >&2 "Fast-forwarded $branch_name to $onto_name."
> 	move_to_original_branch
> 	exit 0
> fi
> 
> Anyone has an example how to make "git rebase" execute that code?
  $ git checkout -b topic master^
  Switched to a new branch 'topic'
  $ git rebase master
  First, rewinding head to replay your work on top of it...
  Fast-forwarded topic to master.
That is, topic was already merged into master.
-- Hannes
Previous: Nguyen Thai Ngoc DuyNext: Stephan Beyer
Message 2 of 4 in “help reproduce fast-forward in rebase”
  1. Nguyen Thai Ngoc DuyMay 20, 2009
  2. Johannes SixtMay 20, 2009
  3. Stephan BeyerMay 20, 2009
  4. Nguyen Thai Ngoc DuyMay 20, 2009

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.