diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2010-06-22 17:07:09 -0700 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2010-06-23 16:54:15 -0700 |
commit | 864cc3de10c3a1ead5eacab973759d6d58162286 (patch) | |
tree | dfa5d1470c9ca2eac53367d3ce2b610ac15f137c /org.eclipse.jgit | |
parent | bfc43c13bcf65d9ed29a9b1c70a829bcec9c5693 (diff) | |
download | jgit-864cc3de10c3a1ead5eacab973759d6d58162286.tar.gz jgit-864cc3de10c3a1ead5eacab973759d6d58162286.zip |
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>
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/lib/RefWriter.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefWriter.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefWriter.java index 6b0c7b3a98..f2738245d4 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefWriter.java +++ b/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(); } /** |