Re: help reproduce fast-forward in rebase

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

> # 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]