summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm
diff options
context:
space:
mode:
authorHan-Wen Nienhuys <hanwen@google.com>2019-09-18 15:18:51 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2019-09-20 01:48:11 +0200
commite5880d9531f17cbaac4d3f2c3428d116532caa6d (patch)
tree1fb7d654a4826e374ec6dd0dd2cba4a57207b748 /org.eclipse.jgit.pgm
parentd75a6b5d813710ea1b21e05c50c6c32219e5f83a (diff)
downloadjgit-e5880d9531f17cbaac4d3f2c3428d116532caa6d.tar.gz
jgit-e5880d9531f17cbaac4d3f2c3428d116532caa6d.zip
reftable: pass OutputStream at construction time
This makes the intended use of the classes more clear. It also simplifies generic functions that write reftables: they only need a ReftableWriter as argument, as the stream is carried within the ReftableWriter. Change-Id: Idbb06f89ae33100f0c0b562cc38e5b3b026d5181 Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit.pgm')
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteReftable.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteReftable.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteReftable.java
index 6cbc1b082b..0320ed1174 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteReftable.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteReftable.java
@@ -128,9 +128,9 @@ class WriteReftable extends TextBuiltin {
cfg.setMaxIndexLevels(indexLevels);
}
- ReftableWriter w = new ReftableWriter(cfg);
+ ReftableWriter w = new ReftableWriter(cfg, os);
w.setMinUpdateIndex(min(logs)).setMaxUpdateIndex(max(logs));
- w.begin(os);
+ w.begin();
w.sortAndWriteRefs(refs);
for (LogEntry e : logs) {
w.writeLog(e.ref, e.updateIndex, e.who,