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>
stable-3.5
Konrad Kügler 11 years ago
parent
commit
b9a0077062
  1. 4
      org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java

4
org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java

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

Loading…
Cancel
Save