aboutsummaryrefslogtreecommitdiff
path: root/git-pull.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-02-27 14:01:11 -0800
committerJunio C Hamano <gitster@pobox.com>2014-02-27 14:01:11 -0800
commit7da5fd6895af9066ad4684e333c57f4086589c2f (patch)
tree17f5d719d315e3106cb56c60b3edf87e9976d3a0 /git-pull.sh
parentd637d1b9a8fb765a8542e69bd2e04b3e229f663b (diff)
parentef93e3a49c3b2b62c6c450f862ce1626bc8dab54 (diff)
downloadgit-7da5fd6895af9066ad4684e333c57f4086589c2f.tar.gz
git-7da5fd6895af9066ad4684e333c57f4086589c2f.tar.xz
Merge branch 'da/pull-ff-configuration'
"git pull" learned to pay attention to pull.ff configuration variable. * da/pull-ff-configuration: pull: add --ff-only to the help text pull: add pull.ff configuration
Diffstat (limited to 'git-pull.sh')
-rwxr-xr-xgit-pull.sh17
1 files changed, 16 insertions, 1 deletions
diff --git a/git-pull.sh b/git-pull.sh
index 0a5aa2c82..def7cc0e2 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]... [<fetch-options>] <repo> <head>...'
+USAGE='[-n | --no-stat] [--[no-]commit] [--[no-]squash] [--[no-]ff|--ff-only] [--[no-]rebase|--rebase=preserve] [-s strategy]... [<fetch-options>] <repo> <head>...'
LONG_USAGE='Fetch one or more remote refs and integrate it/them with the current HEAD.'
SUBDIRECTORY_OK=Yes
OPTIONS_SPEC=
@@ -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