rebase: use peel_committish() where appropriate
[gitweb.git] / git-rebase.sh
index d0c11a910a69603ac19c83a5d29af9f32f780267..6987b9b6db0b81ff4fa0ab8981c690c9a3765612 100755 (executable)
@@ -434,7 +434,7 @@ then
                shift
                ;;
        esac
-       upstream=`git rev-parse --verify "${upstream_name}^0"` ||
+       upstream=$(peel_committish "${upstream_name}") ||
        die "$(eval_gettext "invalid upstream \$upstream_name")"
        upstream_arg="$upstream_name"
 else
@@ -470,7 +470,7 @@ case "$onto_name" in
        fi
        ;;
 *)
-       onto=$(git rev-parse --verify "${onto_name}^0") ||
+       onto=$(peel_committish "$onto_name") ||
        die "$(eval_gettext "Does not point to a valid commit: \$onto_name")"
        ;;
 esac