summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3b2bbe9)
raw | patch | inline | side by side (parent: 3b2bbe9)
author | Stephan Beyer <s-beyer@gmx.net> | |
Sun, 22 Jun 2008 14:07:02 +0000 (16:07 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 23 Jun 2008 01:09:15 +0000 (18:09 -0700) |
"git rebase --continue" and friends gave nonsense errors when there is no
rebase in progress.
Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
rebase in progress.
Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-rebase.sh | patch | blob | history |
diff --git a/git-rebase.sh b/git-rebase.sh
index dd7dfe123c15a4b281c4a25a77887150b4a5dbb5..e2d85eeeab79e60ef46a65cfee1fb4682dd4ba68 100755 (executable)
--- a/git-rebase.sh
+++ b/git-rebase.sh
do
case "$1" in
--continue)
+ test -d "$dotest" -o -d .dotest ||
+ die "No rebase in progress?"
+
git diff-files --quiet --ignore-submodules || {
echo "You must edit all merge conflicts and then"
echo "mark them as resolved using git add"
exit
;;
--skip)
+ test -d "$dotest" -o -d .dotest ||
+ die "No rebase in progress?"
+
git reset --hard HEAD || exit $?
if test -d "$dotest"
then
exit
;;
--abort)
+ test -d "$dotest" -o -d .dotest ||
+ die "No rebase in progress?"
+
git rerere clear
if test -d "$dotest"
then
move_to_original_branch
- elif test -d .dotest
- then
+ else
dotest=.dotest
move_to_original_branch
- else
- die "No rebase in progress?"
fi
git reset --hard $(cat "$dotest/orig-head")
rm -r "$dotest"