projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sha1_to_hex: properly terminate the SHA1
[git.git]
/
git-pull.sh
diff --git
a/git-pull.sh
b/git-pull.sh
index
9601627
..
0991d5f
100755
(executable)
--- a/
git-pull.sh
+++ b/
git-pull.sh
@@
-4,11
+4,9
@@
#
# Fetch one or more remote refs and merge it/them into the current HEAD.
#
# Fetch one or more remote refs and merge it/them into the current HEAD.
-. git-sh-setup || die "Not a git archive"
-
-usage () {
- die "git pull [-n] [-s strategy]... <repo> <head>..."
-}
+USAGE='[-n | --no-summary] [--no-commit] [-s strategy]... [<fetch-options>] <repo> <head>...'
+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
strategy_args= no_summary= no_commit=
while case "$#,$1" in 0) break ;; *,-*) ;; *) break ;; esac
@@
-33,6
+31,9
@@
do
esac
strategy_args="${strategy_args}-s $strategy "
;;
esac
strategy_args="${strategy_args}-s $strategy "
;;
+ -h|--h|--he|--hel|--help)
+ usage
+ ;;
-*)
# Pass thru anything that is meant for fetch.
break
-*)
# Pass thru anything that is meant for fetch.
break
@@
-69,10
+70,22
@@
case "$merge_head" in
exit 0
;;
?*' '?*)
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
;;
esac