diff options
author | Junio C Hamano <junkio@cox.net> | 2007-03-23 17:38:22 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-03-23 23:38:04 -0700 |
commit | 1c2c6112a4bf655faa768ddfca067945edf2809e (patch) | |
tree | 985973c2d5ac3611db6e25f702eecacf7cb41939 /git-rebase.sh | |
parent | t6004: add a bit more path optimization test. (diff) | |
parent | Merge branch 'maint' (diff) | |
download | tgif-1c2c6112a4bf655faa768ddfca067945edf2809e.tar.xz |
Merge branch 'master' into jc/bisect
This is to merge in the fix for path-limited bisection
from the 'master' branch.
Diffstat (limited to 'git-rebase.sh')
-rwxr-xr-x | git-rebase.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/git-rebase.sh b/git-rebase.sh index b51d19d12e..aadd580f8d 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -265,6 +265,10 @@ upstream_name="$1" upstream=`git rev-parse --verify "${upstream_name}^0"` || die "invalid upstream $upstream_name" +# Make sure the branch to rebase onto is valid. +onto_name=${newbase-"$upstream_name"} +onto=$(git-rev-parse --verify "${onto_name}^0") || exit + # If a hook exists, give it a chance to interrupt if test -x "$GIT_DIR/hooks/pre-rebase" then @@ -291,10 +295,6 @@ case "$#" in esac branch=$(git-rev-parse --verify "${branch_name}^0") || exit -# Make sure the branch to rebase onto is valid. -onto_name=${newbase-"$upstream_name"} -onto=$(git-rev-parse --verify "${onto_name}^0") || exit - # Now we are rebasing commits $upstream..$branch on top of $onto # Check if we are already based on $onto, but this should be |