]> source.dussan.org Git - jgit.git/commitdiff
Introduce GPG_SIGNATURE_PREFIX constant 66/1193866/4
authorLuca Milanesio <luca.milanesio@gmail.com>
Fri, 26 Apr 2024 00:20:25 +0000 (01:20 +0100)
committerLuca Milanesio <luca.milanesio@gmail.com>
Fri, 7 Jun 2024 22:59:44 +0000 (22:59 +0000)
Change-Id: If6cabae76d7b38ce26fca534da6fe13973ebbf4f

org.eclipse.jgit/src/org/eclipse/jgit/lib/Constants.java
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevTag.java

index 60a23dde057052b4388ec56b03ed667ebfb9c370..1835dc76a2a4fe8b37fce7ec1c43ad5b827aa752 100644 (file)
@@ -493,6 +493,13 @@ public final class Constants {
         */
        public static final String ATTR_BUILTIN_BINARY_MERGER = "binary"; //$NON-NLS-1$
 
+       /**
+        * Prefix of a GPG signature.
+        *
+        * @since 7.0
+        */
+       public static final String GPG_SIGNATURE_PREFIX = "-----BEGIN PGP SIGNATURE-----"; //$NON-NLS-1$
+
        /**
         * Create a new digest function for objects.
         *
index 75dbd577402720e6b70ae67b326087f19d2d4acf..5b50c2afd78edefbebf846346d42bfdb93ac0054 100644 (file)
@@ -13,6 +13,7 @@
 package org.eclipse.jgit.revwalk;
 
 import static java.nio.charset.StandardCharsets.UTF_8;
+import static org.eclipse.jgit.lib.Constants.GPG_SIGNATURE_PREFIX;
 
 import java.io.IOException;
 import java.nio.charset.Charset;
@@ -39,7 +40,7 @@ import org.eclipse.jgit.util.StringUtils;
 public class RevTag extends RevObject {
 
        private static final byte[] hSignature = Constants
-                       .encodeASCII("-----BEGIN PGP SIGNATURE-----"); //$NON-NLS-1$
+                       .encodeASCII(GPG_SIGNATURE_PREFIX);
 
        /**
         * Parse an annotated tag from its canonical format.