instaweb: Nicer error message when the http daemon isn't found
[gitweb.git] / git-merge.sh
index e8db52725c2d5ea023ec6d875cdfbc7c20240a31..477002910ede7f6bc6bcb9a79f6ddebd248f6bd2 100755 (executable)
@@ -8,6 +8,9 @@ USAGE='[-n] [--no-commit] [--squash] [-s <strategy>] [-m=<merge-message>] <commi
 . git-sh-setup
 set_reflog_action "merge $*"
 
+test -z "$(git ls-files -u)" ||
+       die "You are in a middle of conflicted merge."
+
 LF='
 '
 
@@ -227,9 +230,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