diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-11-23 14:48:04 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-11-23 14:48:04 -0800 |
commit | ad03180c5cf233b2de6b7e3388d96d2126d7a5d9 (patch) | |
tree | 27651d488d9f3829abbf8e4c1581833a222d361d /t | |
parent | Merge branch 'hm/paint-hits-in-log-grep' into maint (diff) | |
parent | pull: should be noop when already-up-to-date (diff) | |
download | tgif-ad03180c5cf233b2de6b7e3388d96d2126d7a5d9.tar.xz |
Merge branch 'ev/pull-already-up-to-date-is-noop' into maint
"git pull" with any strategy when the other side is behind us
should succeed as it is a no-op, but doesn't.
* ev/pull-already-up-to-date-is-noop:
pull: should be noop when already-up-to-date
Diffstat (limited to 't')
-rwxr-xr-x | t/t7601-merge-pull-config.sh | 6 |
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 && |