Make git-recursive the default strategy for git-pull.
This does two things: - It changes the hardcoded default merge strategy for two-head git-pull from resolve to recursive. - .git/config file acquires two configuration items. pull.twohead names the strategy for two-head case, and pull.octopus names the strategy for octopus merge. IOW you are paranoid, you can have the following lines in your .git/config file and keep using git-merge-resolve when pulling one remote: [pull] twohead = resolve OTOH, you can say this: [pull] twohead = resolve twohead = recursive to try quicker resolve first, and when it fails, fall back to recursive. Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano committed
Nov 8, 2005 at 02:00 UTC
a1c292958f9968565f4048a17196d99fd16fc7ca
1 file changed
+14
-2
git-pull.sh
+14
-2
@@ -79,10 +79,22 @@ case "$merge_head" in
79
exit 0
80
;;
81
?*' '?*)
82
- strategy_default_args='-s octopus'
82
+ var=`git-var -l | sed -ne 's/^pull\.octopus=/-s /p'`
83
+ if test '' = "$var"
84
+ then
85
+ strategy_default_args='-s octopus'
86
+ else
87
+ strategy_default_args=$var
88
+ fi
89
;;
90
*)
85
- strategy_default_args='-s resolve'
91
+ var=`git-var -l | sed -ne 's/^pull\.twohead=/-s /p'`
92
+ if test '' = "$var"
93
+ then
94
+ strategy_default_args='-s recursive'
95
+ else
96
+ strategy_default_args=$var
97
+ fi
98
;;
99
esac
100