From b814da891e8261b909fc5d9fb07b4e8b13989c2d Mon Sep 17 00:00:00 2001 From: David Aguilar Date: Wed, 15 Jan 2014 15:18:38 -0800 Subject: pull: add pull.ff configuration Add a `pull.ff` configuration option that is analogous to the `merge.ff` option. This allows us to control the fast-forward behavior for pull-initiated merges only. Signed-off-by: David Aguilar Signed-off-by: Junio C Hamano --- git-pull.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'git-pull.sh') diff --git a/git-pull.sh b/git-pull.sh index b946fd975b..44b792a5d2 100755 --- a/git-pull.sh +++ b/git-pull.sh @@ -52,6 +52,21 @@ if test -z "$rebase" then rebase=$(bool_or_string_config pull.rebase) fi + +# Setup default fast-forward options via `pull.ff` +pull_ff=$(git config pull.ff) +case "$pull_ff" in +false) + no_ff=--no-ff + break + ;; +only) + ff_only=--ff-only + break + ;; +esac + + dry_run= while : do -- cgit v1.2.3 From ef93e3a49c3b2b62c6c450f862ce1626bc8dab54 Mon Sep 17 00:00:00 2001 From: David Aguilar Date: Wed, 15 Jan 2014 15:18:39 -0800 Subject: pull: add --ff-only to the help text Signed-off-by: David Aguilar Signed-off-by: Junio C Hamano --- git-pull.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git-pull.sh') diff --git a/git-pull.sh b/git-pull.sh index 44b792a5d2..d17a461b3d 100755 --- a/git-pull.sh +++ b/git-pull.sh @@ -4,7 +4,7 @@ # # Fetch one or more remote refs and merge it/them into the current HEAD. -USAGE='[-n | --no-stat] [--[no-]commit] [--[no-]squash] [--[no-]ff] [--[no-]rebase|--rebase=preserve] [-s strategy]... [] ...' +USAGE='[-n | --no-stat] [--[no-]commit] [--[no-]squash] [--[no-]ff|--ff-only] [--[no-]rebase|--rebase=preserve] [-s strategy]... [] ...' LONG_USAGE='Fetch one or more remote refs and integrate it/them with the current HEAD.' SUBDIRECTORY_OK=Yes OPTIONS_SPEC= -- cgit v1.2.3