aboutsummaryrefslogtreecommitdiff
path: root/git-rebase.sh
diff options
context:
space:
mode:
Diffstat (limited to 'git-rebase.sh')
-rwxr-xr-xgit-rebase.sh17
1 files changed, 3 insertions, 14 deletions
diff --git a/git-rebase.sh b/git-rebase.sh
index 7c38c00a1..3459fe4f6 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -49,7 +49,8 @@ do_merge=
dotest="$GIT_DIR"/rebase-merge
prec=4
verbose=
-diffstat=$(git config --bool rebase.stat)
+diffstat=
+test "$(git config --bool rebase.stat)" = true && diffstat=t
git_am_opt=
rebase_root=
force_rebase=
@@ -413,19 +414,7 @@ else
fi
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-files --name-status -r --ignore-submodules -- >&2
- exit 1
-fi
-diff=$(git diff-index --cached --name-status -r --ignore-submodules HEAD --)
-case "$diff" in
-?*) echo >&2 "cannot rebase: your index contains uncommitted changes"
- echo >&2 "$diff"
- exit 1
- ;;
-esac
+require_clean_work_tree "rebase" "Please commit or stash them."
if test -z "$rebase_root"
then