[PATCH 1/4] t7601: test for pull.ff=true overrides merge.ff=false
- From
Paul Tan <pyokagan@gmail.com>
- Date
- May 13, 2015, 09:52 UTC
- Message-ID
- <1431510740-9710-2-git-send-email-pyokagan@gmail.com>
- In-Reply-To
- <1431510740-9710-1-git-send-email-pyokagan@gmail.com>
Since b814da8 (pull: add pull.ff configuration, 2014-01-15), running git-pull with the configuration pull.ff=false or pull.ff=only is equivalent to passing --no-ff and --ff-only to git-merge. However, if pull.ff=true, no switch is passed to git-merge. This leads to the confusing behavior where pull.ff=false or pull.ff=only is able to override merge.ff, while pull.ff=true is unable to.
Add a failing test that demonstrates this case.
Signed-off-by: Paul Tan <pyokagan@gmail.com> ---
t/t7601-merge-pull-config.sh | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/t/t7601-merge-pull-config.sh b/t/t7601-merge-pull-config.sh index f768c90..cef94e6 100755 --- a/t/t7601-merge-pull-config.sh +++ b/t/t7601-merge-pull-config.sh @@ -45,6 +45,14 @@ 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' ' + git reset --hard c0 && + test_config merge.ff false && + test_config pull.ff true && + git pull . c1 && + verbose test "$(git rev-parse HEAD)" = "$(git rev-parse c1)" +' + test_expect_success 'fast-forward pull creates merge with "false" in pull.ff' ' git reset --hard c0 && test_config pull.ff false &&
-- 2.1.4