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