aboutsummaryrefslogtreecommitdiff
path: root/git-merge.sh
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2006-12-28 02:35:05 -0500
committerJunio C Hamano <junkio@cox.net>2006-12-28 01:07:51 -0800
commitde811948baa689382ad191c1c95e8be51a92c4fe (patch)
tree709c669fc54479544e58119be5769657fff5a3b8 /git-merge.sh
parentbf699582fd7be26f7809858941fa831380e5bce7 (diff)
downloadgit-de811948baa689382ad191c1c95e8be51a92c4fe.tar.gz
git-de811948baa689382ad191c1c95e8be51a92c4fe.tar.xz
Honor pull.{twohead,octopus} in git-merge.
If git-merge is invoked without a strategy argument it is probably being run as a porcelain-ish command directly and is not being run from within git-pull. However we still should honor whatever merge strategy the user may have selected in their configuration, just as `git-pull .` would have. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-merge.sh')
-rwxr-xr-xgit-merge.sh16
1 files changed, 14 insertions, 2 deletions
diff --git a/git-merge.sh b/git-merge.sh
index e8db52725..ba4226042 100755
--- a/git-merge.sh
+++ b/git-merge.sh
@@ -227,9 +227,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