Add --no-commit to git-merge/git-pull.

With --no-commit flag, git-pull will perform the merge but pretends as
if the merge needed a hand resolve even if automerge cleanly resolves,
to give the user a chance to add further changes and edit the commit
message.

Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Junio C Hamano
2005-11-01 19:30:11 -08:00
parent a3114b3428
commit 123ee3ca7b
2 changed files with 22 additions and 12 deletions

View File

@ -10,13 +10,15 @@ usage () {
die "git pull [-n] [-s strategy]... <repo> <head>..."
}
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)
@ -81,4 +83,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