diff --git a/git-pull.sh b/git-pull.sh
index bf0c2985af875cdb7b2c64998390dbee908ff14c..809e537a4d81233966aad23df11c13931d6250c1 100755 (executable)
--- a/git-pull.sh
+++ b/git-pull.sh
}
test true = "$rebase" && {
+ git update-index --refresh &&
+ git diff-files --quiet &&
+ git diff-index --cached --quiet HEAD -- ||
+ die "refusing to pull with rebase: your working tree is not up-to-date"
+
. git-parse-remote &&
origin="$1"
test -z "$origin" && origin=$(get_default_remote)