Code

Porcelain scripts: Rewrite cryptic "needs update" error message
[git.git] / git-pull.sh
index 8eb74d45debe7ab2bd2cc9b5ed57b1ba49d94bdb..20a3bbea07c259ec1f19353b2888fde20e8b67da 100755 (executable)
@@ -201,10 +201,7 @@ test true = "$rebase" && {
                        die "updating an unborn branch with changes added to the index"
                fi
        else
-               git update-index --ignore-submodules --refresh &&
-               git diff-files --ignore-submodules --quiet &&
-               git diff-index --ignore-submodules --cached --quiet HEAD -- ||
-               die "refusing to pull with rebase: your working tree is not up-to-date"
+               require_clean_work_tree "pull with rebase" "Please commit or stash them."
        fi
        oldremoteref= &&
        . git-parse-remote &&