X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=git-pull.sh;h=29c14e148e1ff5b6f7bc0d8aca705961f0957eb8;hb=1b371f567d9b0094918e128262577b76994eef74;hp=3a139849fbfc545b7c479dd2889a0285fab646d5;hpb=5e80092f7e6db09a40a62e837ca3f74f0bc5ad73;p=git.git diff --git a/git-pull.sh b/git-pull.sh index 3a139849..29c14e14 100755 --- a/git-pull.sh +++ b/git-pull.sh @@ -4,19 +4,10 @@ # # Fetch one or more remote refs and merge it/them into the current HEAD. +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 -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 -} - strategy_args= no_summary= no_commit= while case "$#,$1" in 0) break ;; *,-*) ;; *) break ;; esac do @@ -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