X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=git-rebase.sh;h=f7b2b9401a90e5aa598daa6049ae5d33e5c5b157;hb=d1802851b0c112a065b43e3f83d631f867b7e1ce;hp=211bf6896844ddf2cc903c4c8fcf0f021c3d8131;hpb=00fd12392c8592911e3bb71df09bf3672f7fca04;p=git.git diff --git a/git-rebase.sh b/git-rebase.sh index 211bf689..f7b2b940 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -75,7 +75,7 @@ esac # The upstream head must be given. Make sure it is valid. upstream_name="$1" upstream=`git rev-parse --verify "${upstream_name}^0"` || - die "invalid upsteram $upstream_name" + die "invalid upstream $upstream_name" # If a hook exists, give it a chance to interrupt if test -x "$GIT_DIR/hooks/pre-rebase" @@ -94,7 +94,7 @@ case "$#" in ;; *) branch_name=`git symbolic-ref HEAD` || die "No current branch" - branch_name=`expr "$branch_name" : 'refs/heads/\(.*\)'` + branch_name=`expr "z$branch_name" : 'zrefs/heads/\(.*\)'` ;; esac branch=$(git-rev-parse --verify "${branch_name}^0") || exit @@ -107,7 +107,7 @@ onto=$(git-rev-parse --verify "${onto_name}^0") || exit # Check if we are already based on $onto, but this should be # done only when upstream and onto are the same. -if test "$upstream" = "onto" +if test "$upstream" = "$onto" then mb=$(git-merge-base "$onto" "$branch") if test "$mb" = "$onto"