summaryrefslogtreecommitdiff
path: root/git-rebase.sh
diff options
context:
space:
mode:
authorRamkumar Ramachandra <artagnon@gmail.com>2013-06-14 18:47:52 +0530
committerJunio C Hamano <gitster@pobox.com>2013-06-14 09:41:18 -0700
commit2e6e276decde2a9f04fc29bce734a49d3ba8f484 (patch)
tree86adfcb9208d50e5b3aa1f59501e945ecf66e7c7 /git-rebase.sh
parentbac1ddd0f86bc5955c24f89e402de80d2844efb5 (diff)
downloadgit-2e6e276decde2a9f04fc29bce734a49d3ba8f484.tar.gz
rebase: use peel_committish() where appropriate
The revisions specified on the command-line as <onto> and <upstream> arguments could be of the form :/quuxery; so, use peel_committish() to resolve them. The failing tests in t/rebase and t/rebase-interactive now pass. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-rebase.sh')
-rwxr-xr-xgit-rebase.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/git-rebase.sh b/git-rebase.sh
index d0c11a910a..6987b9b6db 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -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