diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2023-04-21 08:51:08 +0200 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2023-04-22 23:43:40 +0200 |
commit | 032eef5b12a25e0da48004eea589966ae0652433 (patch) | |
tree | 6cd32787ed0a5c43879372c0852b4f4512417c54 /org.eclipse.jgit.test/tst/org/eclipse/jgit/api | |
parent | 06b40b95c2ac28595624e1672949d245aef11fe0 (diff) | |
download | jgit-032eef5b12a25e0da48004eea589966ae0652433.tar.gz jgit-032eef5b12a25e0da48004eea589966ae0652433.zip |
Parse pull.rebase=preserve as alias for pull.rebase=merges
This ensures backwards compatibility to the old config value which was
removed in git 2.34 which JGit followed in Ic07ff954e2.
Change-Id: I2b4e27fd71898b6e0e227e406c40682bd9786cd4
Diffstat (limited to 'org.eclipse.jgit.test/tst/org/eclipse/jgit/api')
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PullCommandTest.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PullCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PullCommandTest.java index 7a0ffdbeca..12300b3390 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PullCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PullCommandTest.java @@ -394,6 +394,21 @@ public class PullCommandTest extends RepositoryTestCase { } @Test + /** + * global rebase config using old "preserve" value which was renamed to + * "merges" should be respected to ensure backwards compatibility + */ + public void testPullWithRebaseMerges1ConfigAlias() throws Exception { + Callable<PullResult> setup = () -> { + StoredConfig config = dbTarget.getConfig(); + config.setString("pull", null, "rebase", "preserve"); + config.save(); + return target.pull().call(); + }; + doTestPullWithRebase(setup, TestPullMode.REBASE_MERGES); + } + + @Test /** the branch-local config should win over the global config */ public void testPullWithRebaseMergesConfig2() throws Exception { Callable<PullResult> setup = () -> { |