X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-rebase.sh;h=2315d95a9fb28e15190461a94a43e28e57fbe6c3;hb=d34eca0392ef1da769788b60402d9a57dbc8c1c9;hp=18bc6946cfa592c11cf7499b1c1ff9a6cb378b26;hpb=128a9d86da3c156c7d1bf25692eeb68a522af935;p=git.git diff --git a/git-rebase.sh b/git-rebase.sh index 18bc6946c..2315d95a9 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -333,6 +333,9 @@ do ;; esac ;; + --ignore-whitespace) + git_am_opt="$git_am_opt $1" + ;; --committer-date-is-author-date|--ignore-date) git_am_opt="$git_am_opt $1" force_rebase=t @@ -382,8 +385,10 @@ else fi # The tree must be really really clean. -if ! git update-index --ignore-submodules --refresh; then - die "cannot rebase: you have unstaged changes" +if ! git update-index --ignore-submodules --refresh > /dev/null; then + echo >&2 "cannot rebase: you have unstaged changes" + git diff --name-status -r --ignore-submodules -- >&2 + exit 1 fi diff=$(git diff-index --cached --name-status -r --ignore-submodules HEAD --) case "$diff" in