Consistent message encoding while reusing log from an existing commit.
[gitweb.git] / git-pull.sh
index 28d08195f0c84b7f3a89a5c5cff9945bb64ddfb3..e9826fc4cec14d82171f495af25324b24fe9f19b 100755 (executable)
@@ -8,6 +8,10 @@ USAGE='[-n | --no-summary] [--no-commit] [-s strategy]... [<fetch-options>] <rep
 LONG_USAGE='Fetch one or more remote refs and merge it/them into the current HEAD.'
 . git-sh-setup
 set_reflog_action "pull $*"
+require_work_tree
+
+test -z "$(git ls-files -u)" ||
+       die "You are in a middle of conflicted merge."
 
 strategy_args= no_summary= no_commit= squash=
 while case "$#,$1" in 0) break ;; *,-*) ;; *) break ;; esac