]> source.dussan.org Git - jgit.git/commitdiff
Repository.writeMergeHeads to accept a list with subtypes of ObjectId 69/29769/2
authorKonrad Kügler <swamblumat-eclipsebugs@yahoo.de>
Fri, 16 May 2014 16:33:12 +0000 (18:33 +0200)
committerKonrad Kügler <swamblumat-eclipsebugs@yahoo.de>
Mon, 14 Jul 2014 18:54:52 +0000 (14:54 -0400)
Allows to pass for example a List<RevCommit>.

Change-Id: I5522707060d7d3e0d848ba579956dc62f8fa0234
Signed-off-by: Konrad Kügler <swamblumat-eclipsebugs@yahoo.de>
org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java

index 1538d277b1f2795e4c8c37c8450a0206542b2126..37e31ef47d14ee7cdd4bff7f43cdcf253077d255 100644 (file)
@@ -1393,7 +1393,7 @@ public abstract class Repository {
         *            $GIT_DIR/MERGE_HEAD or <code>null</code> to delete the file
         * @throws IOException
         */
-       public void writeMergeHeads(List<ObjectId> heads) throws IOException {
+       public void writeMergeHeads(List<? extends ObjectId> heads) throws IOException {
                writeHeadsFile(heads, Constants.MERGE_HEAD);
        }
 
@@ -1590,7 +1590,7 @@ public abstract class Repository {
         * @throws FileNotFoundException
         * @throws IOException
         */
-       private void writeHeadsFile(List<ObjectId> heads, String filename)
+       private void writeHeadsFile(List<? extends ObjectId> heads, String filename)
                        throws FileNotFoundException, IOException {
                File headsFile = new File(getDirectory(), filename);
                if (heads != null) {