X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-pull.sh;h=2358af62d5eb008ef3d04de67cea7a56aab16526;hb=68afd5fab777a3c27e205d33c2379d8af6c7749f;hp=0290e517c2067a506e63a86c6f0b909426421678;hpb=60fb5b2c4d9e26204f480f8a18ae1ff0051a6440;p=git.git diff --git a/git-pull.sh b/git-pull.sh index 0290e517c..2358af62d 100755 --- a/git-pull.sh +++ b/git-pull.sh @@ -7,16 +7,25 @@ . git-sh-setup || die "Not a git archive" usage () { - die "git pull [-n] [-s strategy]... ..." + 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= +strategy_args= no_summary= no_commit= while case "$#,$1" in 0) break ;; *,-*) ;; *) break ;; esac do case "$1" in -n|--n|--no|--no-|--no-s|--no-su|--no-sum|--no-summ|\ --no-summa|--no-summar|--no-summary) no_summary=-n ;; + --no-c|--no-co|--no-com|--no-comm|--no-commi|--no-commit) + no_commit=--no-commit ;; -s=*|--s=*|--st=*|--str=*|--stra=*|--strat=*|--strate=*|\ --strateg=*|--strategy=*|\ -s|--s|--st|--str|--stra|--strat|--strate|--strateg|--strategy) @@ -31,9 +40,13 @@ do esac strategy_args="${strategy_args}-s $strategy " ;; - -*) + -h|--h|--he|--hel|--help) usage ;; + -*) + # Pass thru anything that is meant for fetch. + break + ;; esac shift done @@ -80,4 +93,4 @@ case "$strategy_args" in esac merge_name=$(git-fmt-merge-msg <"$GIT_DIR/FETCH_HEAD") -git-merge $no_summary $strategy_args "$merge_name" HEAD $merge_head +git-merge $no_summary $no_commit $strategy_args "$merge_name" HEAD $merge_head