Skip to content

Commit

Permalink
Merge branch 'sb/maint-rebase' into maint
Browse files Browse the repository at this point in the history
* sb/maint-rebase:
  git-rebase.sh: Add check if rebase is in progress
  • Loading branch information
Junio C Hamano committed Jun 25, 2008
2 parents 87412ec + cd5320f commit 340a6b5
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions git-rebase.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand All @@ -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"
Expand Down

0 comments on commit 340a6b5

Please sign in to comment.