Skip to contentSkip to conversation

rebase: Fix the detection of fast-forwarding of the current branch to upstream.

PATCH New Robert Shearman 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 rebase: Fix the detection of fast-forwarding of the current branch to upstream.

Previously, a rebasing operation with on a branch that is just tracking an upstream branch would output a confusing "Nothing to do" due to no patches being given to git-am.

The test brings the behaviour back into line with that of just before e646c9c8c0aa995eac284ea0a2117add19c4461c.

---
 git-rebase.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
git-rebase.sh +1 -1
index 29028dd..5554541 100755
@@ -281,7 +281,7 @@ git-reset --hard "$onto"
 
 # If the $onto is a proper descendant of the tip of the branch, then
 # we just fast forwarded.
-if test "$mb" = "$onto"
+if test "$mb" = "$branch"
 then
 	echo >&2 "Fast-forwarded $branch to $newbase."
 	exit 0