X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-pull.sh;h=17fda26721b7203faffd68bd178d5b757252d4d8;hb=c816a6bc5a8494556e00c36d4ed4596a04efd38a;hp=2358af62d5eb008ef3d04de67cea7a56aab16526;hpb=31b9755a655aa34373d8b39030e9a0f46ffa0078;p=git.git diff --git a/git-pull.sh b/git-pull.sh index 2358af62d..17fda2672 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