From 81199f02fb49f79ef17b2daa3efac00d16040766 Mon Sep 17 00:00:00 2001 From: granny Date: Tue, 2 Jul 2024 15:15:37 -0700 Subject: Lib: Fix ssh value for gpg.format throwing an IllegalArgumentException Git version 2.34 and later supports signing commits and tags with SSH keys. This means gpg.format now supports "ssh" as a value. Change-Id: Iee1e5a68a816bec149a17a73a6916d2884a54163 --- .../tst/org/eclipse/jgit/lib/GpgConfigTest.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'org.eclipse.jgit.test') diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/GpgConfigTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/GpgConfigTest.java index 32f6766d47..5c2b190777 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/GpgConfigTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/GpgConfigTest.java @@ -95,6 +95,16 @@ public class GpgConfigTest { assertEquals(GpgConfig.GpgFormat.X509, new GpgConfig(c).getKeyFormat()); } + @Test + public void testGetKeyFormat_ssh() throws Exception { + Config c = parse("" // + + "[gpg]\n" // + + " format = ssh\n" // + ); + + assertEquals(GpgConfig.GpgFormat.SSH, new GpgConfig(c).getKeyFormat()); + } + @Test public void testGetSigningKey() throws Exception { Config c = parse("" // -- cgit v1.2.3