diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-06-25 11:18:39 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-06-25 11:18:39 -0700 |
commit | 340a6b58da21442492650f0e1d7e25be5253c677 (patch) | |
tree | 669451af9482ef69d7710065648799dcbcd8d1b3 | |
parent | 87412ec1f17bc2705595ebabc010d94cb46478b7 (diff) | |
parent | cd5320f25228b4c3bbef2391df2696dca09d3d46 (diff) | |
download | git-340a6b58da21442492650f0e1d7e25be5253c677.tar.gz git-340a6b58da21442492650f0e1d7e25be5253c677.tar.xz |
Merge branch 'sb/maint-rebase' into maint
* sb/maint-rebase:
git-rebase.sh: Add check if rebase is in progress
-rwxr-xr-x | git-rebase.sh | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/git-rebase.sh b/git-rebase.sh index dd7dfe123..e2d85eeea 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -150,6 +150,9 @@ while test $# != 0 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" @@ -178,6 +181,9 @@ do exit ;; --skip) + test -d "$dotest" -o -d .dotest || + die "No rebase in progress?" + git reset --hard HEAD || exit $? if test -d "$dotest" then @@ -203,16 +209,16 @@ do 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" |