Print out the edge commits for each packfile in fast-import.
[gitweb.git] / git-merge.sh
index e8db52725c2d5ea023ec6d875cdfbc7c20240a31..3eef048efc7a848145697e205d154c92f8c7ec0f 100755 (executable)
@@ -7,6 +7,10 @@ USAGE='[-n] [--no-commit] [--squash] [-s <strategy>] [-m=<merge-message>] <commi
 
 . git-sh-setup
 set_reflog_action "merge $*"
+require_work_tree
+
+test -z "$(git ls-files -u)" ||
+       die "You are in a middle of conflicted merge."
 
 LF='
 '
@@ -227,9 +231,21 @@ case "$use_strategies" in
 '')
        case "$#" in
        1)
-               use_strategies="$default_twohead_strategies" ;;
+               var="`git-repo-config --get pull.twohead`"
+               if test -n "$var"
+               then
+                       use_strategies="$var"
+               else
+                       use_strategies="$default_twohead_strategies"
+               fi ;;
        *)
-               use_strategies="$default_octopus_strategies" ;;
+               var="`git-repo-config --get pull.octopus`"
+               if test -n "$var"
+               then
+                       use_strategies="$var"
+               else
+                       use_strategies="$default_octopus_strategies"
+               fi ;;
        esac
        ;;
 esac