X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=git-pull.sh;h=29c14e148e1ff5b6f7bc0d8aca705961f0957eb8;hb=ac5a85181ac18b0119705f46cfa825389643df33;hp=2358af62d5eb008ef3d04de67cea7a56aab16526;hpb=77131db5855ed044e30706aa1219d79126686f00;p=git.git diff --git a/git-pull.sh b/git-pull.sh index 2358af62..29c14e14 100755 --- a/git-pull.sh +++ b/git-pull.sh @@ -4,18 +4,9 @@ # # Fetch one or more remote refs and merge it/them into the current HEAD. -. git-sh-setup || die "Not a git archive" - -usage () { - echo >&2 "usage: $0"' [-n] [--no-commit] [--no-summary] [--help] - [-s strategy]... - [] - ... - -Fetch one or more remote refs and merge it/them into the current HEAD. -' - exit 1 -} +USAGE='[-n | --no-summary] [--no-commit] [-s strategy]... [] ...' +LONG_USAGE='Fetch one or more remote refs and merge it/them into the current HEAD.' +. git-sh-setup strategy_args= no_summary= no_commit= while case "$#,$1" in 0) break ;; *,-*) ;; *) break ;; esac @@ -79,10 +70,18 @@ case "$merge_head" in exit 0 ;; ?*' '?*) - strategy_default_args='-s octopus' + var=`git-repo-config --get pull.octopus` + if test -n "$var" + then + strategy_default_args="-s $var" + fi ;; *) - strategy_default_args='-s resolve' + var=`git-repo-config --get pull.twohead` + if test -n "$var" + then + strategy_default_args="-s $var" + fi ;; esac