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>
Shawn O. Pearce committed
Dec 28, 2006 at 02:35 UTC
de811948baa689382ad191c1c95e8be51a92c4fe
1 file changed
+14
-2
git-merge.sh
+14
-2
@@ -227,9 +227,21 @@ case "$use_strategies" in
227
'')
228
case "$#" in
229
1)
230
- use_strategies="$default_twohead_strategies" ;;
230
+ var="`git-repo-config --get pull.twohead`"
231
+ if test -n "$var"
232
+ then
233
+ use_strategies="$var"
234
+ else
235
+ use_strategies="$default_twohead_strategies"
236
+ fi ;;
237
*)
232
- use_strategies="$default_octopus_strategies" ;;
238
+ var="`git-repo-config --get pull.octopus`"
239
+ if test -n "$var"
240
+ then
241
+ use_strategies="$var"
242
+ else
243
+ use_strategies="$default_octopus_strategies"
244
+ fi ;;
245
esac
246
;;
247
esac