]> source.dussan.org Git - jgit.git/commitdiff
Pull up additionalRefsNames from RefDirectory to RefDatabase 56/197556/6
authorMatthias Sohn <matthias.sohn@sap.com>
Sat, 9 Oct 2021 00:47:03 +0000 (02:47 +0200)
committerMatthias Sohn <matthias.sohn@sap.com>
Wed, 4 Jan 2023 22:51:30 +0000 (23:51 +0100)
This enables to reuse this constant in all RefDatabase implementations.

Change-Id: I13d8fb780de24f71e005b698965fb5bcdbf3c728

org.eclipse.jgit/.settings/.api_filters
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectory.java
org.eclipse.jgit/src/org/eclipse/jgit/lib/RefDatabase.java

index ae801e21cac03055576fc4785e06944b983c80a2..5031e3e75fe8f9c5f589cdeef93410e2f4355e1e 100644 (file)
@@ -8,4 +8,12 @@
             </message_arguments>
         </filter>
     </resource>
+    <resource path="src/org/eclipse/jgit/lib/RefDatabase.java" type="org.eclipse.jgit.lib.RefDatabase">
+        <filter id="336658481">
+            <message_arguments>
+                <message_argument value="org.eclipse.jgit.lib.RefDatabase"/>
+                <message_argument value="additionalRefsNames"/>
+            </message_arguments>
+        </filter>
+    </resource>
 </component>
index 7d3792ef46513f2c9273e68125c1da271f18bd9e..8671583ad2076918a98bb3c3f297d5eb94222ec1 100644 (file)
@@ -108,11 +108,6 @@ public class RefDirectory extends RefDatabase {
        /** If in the header, denotes the file has peeled data. */
        public static final String PACKED_REFS_PEELED = " peeled"; //$NON-NLS-1$
 
-       /** The names of the additional refs supported by this class */
-       private static final String[] additionalRefsNames = new String[] {
-                       Constants.MERGE_HEAD, Constants.FETCH_HEAD, Constants.ORIG_HEAD,
-                       Constants.CHERRY_PICK_HEAD };
-
        @SuppressWarnings("boxing")
        private static final List<Integer> RETRY_SLEEP_MS =
                        Collections.unmodifiableList(Arrays.asList(0, 100, 200, 400, 800, 1600));
index 7b7bdebac8a11a17c8e9a630843bd4632b9e9925..9848bc555b01228a2151a61581f59f1909c6f53f 100644 (file)
@@ -68,6 +68,15 @@ public abstract class RefDatabase {
         */
        public static final String ALL = "";//$NON-NLS-1$
 
+       /**
+        * The names of additional refs
+        *
+        * @since 6.5
+        */
+       protected static final String[] additionalRefsNames = new String[] {
+                       Constants.MERGE_HEAD, Constants.FETCH_HEAD, Constants.ORIG_HEAD,
+                       Constants.CHERRY_PICK_HEAD, Constants.REVERT_HEAD };
+
        /**
         * Initialize a new reference database at this location.
         *