Skip to content

Commit

Permalink
Let merge set the default strategy.
Browse files Browse the repository at this point in the history
If the user does not set a merge strategy for git-pull,
let git-merge calculate a default strategy.

[jc: with minor stylistic tweaks]

Signed-off-by: Mark Hollomon <markhollomon@comcast.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Mark Hollomon authored and Junio C Hamano committed Mar 16, 2006
1 parent c982647 commit c8e2db0
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions git-pull.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,15 @@ case "$merge_head" in
;;
?*' '?*)
var=`git repo-config --get pull.octopus`
if test '' = "$var"
if test -n "$var"
then
strategy_default_args='-s octopus'
else
strategy_default_args="-s $var"
fi
;;
*)
var=`git repo-config --get pull.twohead`
if test '' = "$var"
then
strategy_default_args='-s recursive'
else
if test -n "$var"
then
strategy_default_args="-s $var"
fi
;;
Expand Down

0 comments on commit c8e2db0

Please sign in to comment.