user manual: answer some comments from Junio
[gitweb.git] / git-pull.sh
index fd4ffb858af681860820ce27c478271f9cada792..c184fb81a4dab622d79120bcc986c3bf2b07df7f 100755 (executable)
@@ -9,6 +9,9 @@ LONG_USAGE='Fetch one or more remote refs and merge it/them into the current HEA
 . git-sh-setup
 set_reflog_action "pull $*"
 
+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
 do
@@ -90,18 +93,6 @@ case "$merge_head" in
                echo >&2 "Cannot merge multiple branches into empty head"
                exit 1
        fi
-       var=`git-repo-config --get pull.octopus`
-       if test -n "$var"
-       then
-               strategy_default_args="-s $var"
-       fi
-       ;;
-*)
-       var=`git-repo-config --get pull.twohead`
-       if test -n "$var"
-        then
-               strategy_default_args="-s $var"
-       fi
        ;;
 esac
 
@@ -112,12 +103,6 @@ then
        exit
 fi
 
-case "$strategy_args" in
-'')
-       strategy_args=$strategy_default_args
-       ;;
-esac
-
 merge_name=$(git-fmt-merge-msg <"$GIT_DIR/FETCH_HEAD") || exit
-git-merge $no_summary $no_commit $squash $strategy_args \
+exec git-merge $no_summary $no_commit $squash $strategy_args \
        "$merge_name" HEAD $merge_head