Code

move show_pack_info() where it belongs
[git.git] / git-pull.sh
index bf0c2985af875cdb7b2c64998390dbee908ff14c..809e537a4d81233966aad23df11c13931d6250c1 100755 (executable)
@@ -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)