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