Teach git-pull about --[no-]ff, --no-squash and --commit
These options are supported by git-merge, but git-pull didn't know about them. Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Lars Hjemli committed
Oct 29, 2007 at 09:41 UTC
5072a32382fb65fa7295811575d0f5c09cbe0dc3
1 file changed
+11
-3
git-pull.sh
+11
-3
@@ -4,7 +4,7 @@
4
#
5
# Fetch one or more remote refs and merge it/them into the current HEAD.
6
7
-USAGE='[-n | --no-summary] [--no-commit] [-s strategy]... [<fetch-options>] <repo> <head>...'
7
+USAGE='[-n | --no-summary] [--[no-]commit] [--[no-]squash] [--[no-]ff] [-s strategy]... [<fetch-options>] <repo> <head>...'
8
LONG_USAGE='Fetch one or more remote refs and merge it/them into the current HEAD.'
9
SUBDIRECTORY_OK=Yes
10
. git-sh-setup
@@ -15,7 +15,7 @@ cd_to_toplevel
15
test -z "$(git ls-files -u)" ||
16
die "You are in the middle of a conflicted merge."
17
18
-strategy_args= no_summary= no_commit= squash=
18
+strategy_args= no_summary= no_commit= squash= no_ff=
19
while :
20
do
21
case "$1" in
@@ -27,8 +27,16 @@ do
27
;;
28
--no-c|--no-co|--no-com|--no-comm|--no-commi|--no-commit)
29
no_commit=--no-commit ;;
30
+ --c|--co|--com|--comm|--commi|--commit)
31
+ no_commit=--commit ;;
32
--sq|--squ|--squa|--squas|--squash)
33
squash=--squash ;;
34
+ --no-sq|--no-squ|--no-squa|--no-squas|--no-squash)
35
+ squash=--no-squash ;;
36
+ --ff)
37
+ no_ff=--ff ;;
38
+ --no-ff)
39
+ no_ff=--no-ff ;;
40
-s=*|--s=*|--st=*|--str=*|--stra=*|--strat=*|--strate=*|\
41
--strateg=*|--strategy=*|\
42
-s|--s|--st|--str|--stra|--strat|--strate|--strateg|--strategy)
@@ -133,5 +141,5 @@ then
141
fi
142
143
merge_name=$(git fmt-merge-msg <"$GIT_DIR/FETCH_HEAD") || exit
136
-exec git-merge $no_summary $no_commit $squash $strategy_args \
144
+exec git-merge $no_summary $no_commit $squash $no_ff $strategy_args \
145
"$merge_name" HEAD $merge_head