X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=git-pull.sh;h=809e537a4d81233966aad23df11c13931d6250c1;hb=e46f9c8161a0df4d4b9f8c8a98b1a8c0d9452cfd;hp=bf0c2985af875cdb7b2c64998390dbee908ff14c;hpb=761adeb4dba3305d0810b5340a71783d29484fb0;p=git.git diff --git a/git-pull.sh b/git-pull.sh index bf0c2985a..809e537a4 100755 --- a/git-pull.sh +++ b/git-pull.sh @@ -107,6 +107,11 @@ error_on_no_merge_candidates () { } 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)