Browse Source

Expose RefWriter constructor taking RefList

An implementation might prefer to use the RefList type here, and
RefList is part of our public API.  Expose the constructor so callers
who have a RefList can take advantage of the existing sorting.

Change-Id: I545867f85aa2c479d2d610024ebbe318144709c8
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
stable-0.9
Shawn O. Pearce 15 years ago
parent
commit
864cc3de10
  1. 9
      org.eclipse.jgit/src/org/eclipse/jgit/lib/RefWriter.java

9
org.eclipse.jgit/src/org/eclipse/jgit/lib/RefWriter.java

@ -86,8 +86,13 @@ public abstract class RefWriter {
this.refs = RefComparator.sort(refs.values());
}
RefWriter(RefList<Ref> list) {
this.refs = list.asList();
/**
* @param refs
* the complete set of references. This should have been computed
* by applying updates to the advertised refs already discovered.
*/
public RefWriter(RefList<Ref> refs) {
this.refs = refs.asList();
}
/**

Loading…
Cancel
Save