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

* $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);
} }


* @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