summaryrefslogtreecommitdiffstats
path: root/t/t7601-merge-pull-config.sh
diff options
context:
space:
mode:
authorErwin Villejo <erwin.villejo@gmail.com>2021-11-17 08:55:50 +0100
committerJunio C Hamano <gitster@pobox.com>2021-11-18 23:38:53 +0100
commitea1954af771253660cd84dc73b8f2832327c9c02 (patch)
treefc4ff432663177f70df17343ce72a1ce214f9a43 /t/t7601-merge-pull-config.sh
parentpull: --ff-only should make it a noop when already-up-to-date (diff)
downloadgit-ea1954af771253660cd84dc73b8f2832327c9c02.tar.xz
git-ea1954af771253660cd84dc73b8f2832327c9c02.zip
pull: should be noop when already-up-to-date
The already-up-to-date pull bug was fixed for --ff-only but it did not include the case where --ff or --ff-only are not specified. This updates the --ff-only fix to include the case where --ff or --ff-only are not specified in command line flags or config. Signed-off-by: Erwin Villejo <erwin.villejo@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7601-merge-pull-config.sh')
-rwxr-xr-xt/t7601-merge-pull-config.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t7601-merge-pull-config.sh b/t/t7601-merge-pull-config.sh
index 6275641b9c..bd238d89b0 100755
--- a/t/t7601-merge-pull-config.sh
+++ b/t/t7601-merge-pull-config.sh
@@ -387,6 +387,12 @@ test_expect_success 'pull prevents non-fast-forward with "only" in pull.ff' '
test_must_fail git pull . c3
'
+test_expect_success 'already-up-to-date pull succeeds with unspecified pull.ff' '
+ git reset --hard c1 &&
+ git pull . c0 &&
+ test "$(git rev-parse HEAD)" = "$(git rev-parse c1)"
+'
+
test_expect_success 'already-up-to-date pull succeeds with "only" in pull.ff' '
git reset --hard c1 &&
test_config pull.ff only &&