aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AbstractFetchCommand.java
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AbstractFetchCommand.java')
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AbstractFetchCommand.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AbstractFetchCommand.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AbstractFetchCommand.java
index 1fe39da8a6..d226df21bb 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AbstractFetchCommand.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AbstractFetchCommand.java
@@ -50,7 +50,6 @@ package org.eclipse.jgit.pgm;
import static java.lang.Character.valueOf;
import java.io.IOException;
-import java.io.PrintWriter;
import java.text.MessageFormat;
import org.eclipse.jgit.lib.Constants;
@@ -60,6 +59,7 @@ import org.eclipse.jgit.lib.RefUpdate;
import org.eclipse.jgit.pgm.internal.CLIText;
import org.eclipse.jgit.transport.FetchResult;
import org.eclipse.jgit.transport.TrackingRefUpdate;
+import org.eclipse.jgit.util.io.ThrowingPrintWriter;
import org.kohsuke.args4j.Option;
abstract class AbstractFetchCommand extends TextBuiltin {
@@ -92,11 +92,10 @@ abstract class AbstractFetchCommand extends TextBuiltin {
} finally {
reader.release();
}
- showRemoteMessages(r.getMessages());
+ showRemoteMessages(errw, r.getMessages());
}
- static void showRemoteMessages(String pkt) {
- PrintWriter writer = new PrintWriter(System.err);
+ static void showRemoteMessages(ThrowingPrintWriter writer, String pkt) throws IOException {
while (0 < pkt.length()) {
final int lf = pkt.indexOf('\n');
final int cr = pkt.indexOf('\r');