#
# Fetch one or more remote refs and merge it/them into the current HEAD.
-. git-sh-setup || die "Not a git archive"
+. git-sh-setup
usage () {
- die "git pull [-n] [-s strategy]... <repo> <head>..."
+ echo >&2 "usage: $0"' [-n] [--no-commit] [--no-summary] [--help]
+ [-s strategy]...
+ [<fetch-options>]
+ <repo> <head>...
+
+Fetch one or more remote refs and merge it/them into the current HEAD.
+'
+ exit 1
}
strategy_args= no_summary= no_commit=
esac
strategy_args="${strategy_args}-s $strategy "
;;
+ -h|--h|--he|--hel|--help)
+ usage
+ ;;
-*)
# Pass thru anything that is meant for fetch.
break
exit 0
;;
?*' '?*)
- strategy_default_args='-s octopus'
+ var=`git-var -l | sed -ne 's/^pull\.octopus=/-s /p'`
+ if test '' = "$var"
+ then
+ strategy_default_args='-s octopus'
+ else
+ strategy_default_args=$var
+ fi
;;
*)
- strategy_default_args='-s resolve'
+ 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
+ fi
;;
esac