X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-pull.sh;h=17fda26721b7203faffd68bd178d5b757252d4d8;hb=c816a6bc5a8494556e00c36d4ed4596a04efd38a;hp=3b875ad438c21df50c0b1f26bc8fac5ab1bc9740;hpb=a1c292958f9968565f4048a17196d99fd16fc7ca;p=git.git diff --git a/git-pull.sh b/git-pull.sh index 3b875ad43..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,21 +70,17 @@ case "$merge_head" in exit 0 ;; ?*' '?*) - var=`git-var -l | sed -ne 's/^pull\.octopus=/-s /p'` - if test '' = "$var" + var=`git repo-config --get pull.octopus` + if test -n "$var" then - strategy_default_args='-s octopus' - else - strategy_default_args=$var + strategy_default_args="-s $var" fi ;; *) - var=`git-var -l | sed -ne 's/^pull\.twohead=/-s /p'` - if test '' = "$var" - then - strategy_default_args='-s recursive' - else - strategy_default_args=$var + var=`git repo-config --get pull.twohead` + if test -n "$var" + then + strategy_default_args="-s $var" fi ;; esac