filter-branch: remove an unnecessary use of 'git read-tree'
[gitweb.git] / git-rebase.sh
index 3555d17a5d0f4f6e79cd2283efec04d89668017c..0ec435558f8ad59e96766cd3f34cbb541f2dbaed 100755 (executable)
@@ -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
@@ -384,7 +387,7 @@ fi
 # The tree must be really really clean.
 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
+       git diff-files --name-status -r --ignore-submodules -- >&2
        exit 1
 fi
 diff=$(git diff-index --cached --name-status -r --ignore-submodules HEAD --)
@@ -464,7 +467,7 @@ orig_head=$branch
 mb=$(git merge-base "$onto" "$branch")
 if test "$upstream" = "$onto" && test "$mb" = "$onto" &&
        # linear history?
-       ! (git rev-list --parents "$onto".."$branch" | grep " .* ") > /dev/null
+       ! (git rev-list --parents "$onto".."$branch" | sane_grep " .* ") > /dev/null
 then
        if test -z "$force_rebase"
        then