While since b814da8 (pull: add pull.ff configuration, 2014-01-15) git-pull would set the --no-ff or --ff-only switch if pull.ff was false and only respectively, it did not set the --ff switch if pull.ff was true. This led to the inconsistent behavior that pull.ff=false and pull.ff=only would override merge.ff, but pull.ff=true would not. Fix this by adding the --ff switch if pull.ff=true. --- git-pull.sh | 3 +++ t/t7601-merge-pull-config.sh | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/git-pull.sh b/git-pull.sh index 9ed01fd..e51dd37 100755 --- a/git-pull.sh +++ b/git-pull.sh @@ -56,6 +56,9 @@ fi # Setup default fast-forward options via `pull.ff` pull_ff=$(git config pull.ff) case "$pull_ff" in +true) + no_ff=--ff + ;; false) no_ff=--no-ff ;; diff --git a/t/t7601-merge-pull-config.sh b/t/t7601-merge-pull-config.sh index cef94e6..d16ef8b 100755 --- a/t/t7601-merge-pull-config.sh +++ b/t/t7601-merge-pull-config.sh @@ -45,7 +45,7 @@ test_expect_success 'fast-forward pull succeeds with "true" in pull.ff' ' test "$(git rev-parse HEAD)" = "$(git rev-parse c1)" ' -test_expect_failure 'pull.ff=true overrides merge.ff=false' ' +test_expect_success 'pull.ff=true overrides merge.ff=false' ' git reset --hard c0 && test_config merge.ff false && test_config pull.ff true && -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html