diff --git a/tools/git-step-rebase b/tools/git-step-rebase index e2cd4ae..d19414e 100755 --- a/tools/git-step-rebase +++ b/tools/git-step-rebase @@ -55,8 +55,14 @@ wait_count 5 while [ ${PARENTS} -ge 0 ]; do echo -e "Next: rebasing to \033[1m${BASE_BRANCH}~${PARENTS}\033[0m" sleep 1 - if ! git rebase -X ignore-all-space --whitespace=fix ${BASE_BRANCH}~${PARENTS}; then - exit + if ! git rebase --whitespace=fix ${BASE_BRANCH}~${PARENTS}; then + echo + echo "Standard rebase failed." + echo "Trying again, this time ignoring whitespace ..." + git rebase --abort + if ! git rebase -X ignore-all-space --whitespace=fix ${BASE_BRANCH}~${PARENTS}; then + exit + fi fi let PARENTS=${PARENTS}-1 done