diff options
author | David Aguilar <davvid@gmail.com> | 2014-01-15 15:18:38 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-01-15 16:01:06 -0800 |
commit | b814da891e8261b909fc5d9fb07b4e8b13989c2d (patch) | |
tree | 20bdca746012df5441dbfc5bdaab9a75e9649c7d /git-pull.sh | |
parent | 4224916ae979204f13db2996d9e32490e0acb90f (diff) | |
download | git-b814da891e8261b909fc5d9fb07b4e8b13989c2d.tar.gz |
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 <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-pull.sh')
-rwxr-xr-x | git-pull.sh | 15 |
1 files changed, 15 insertions, 0 deletions
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 |