Browse Source

Repository.writeMergeHeads to accept a list with subtypes of ObjectId

Allows to pass for example a List<RevCommit>.

Change-Id: I5522707060d7d3e0d848ba579956dc62f8fa0234
Signed-off-by: Konrad Kügler <swamblumat-eclipsebugs@yahoo.de>
tags/v3.5.0.201409071800-rc1
Konrad Kügler 10 years ago
parent
commit
b9a0077062
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java

+ 2
- 2
org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java View 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) {

Loading…
Cancel
Save