* [JGIT PATCH] Don't log TransportGitSsh error stream to JVM stderr
@ 2009-06-07 22:31 Shawn O. Pearce
0 siblings, 0 replies; only message in thread
From: Shawn O. Pearce @ 2009-06-07 22:31 UTC (permalink / raw)
To: Robin Rosenberg; +Cc: git
This is an API function, not a user interface routine. We should not
be printing messages from the remote side to our console. Instead we
should buffer them, and allow a TransportException to be thrown which
contains the message data. Higher level user interface routines
can then catch that exception, and display the message, if any, in
a form that is appropriate to the context.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
---
.../spearce/jgit/transport/TransportGitSsh.java | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/org.spearce.jgit/src/org/spearce/jgit/transport/TransportGitSsh.java b/org.spearce.jgit/src/org/spearce/jgit/transport/TransportGitSsh.java
index 2e9e0be..de72d02 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/transport/TransportGitSsh.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/transport/TransportGitSsh.java
@@ -166,17 +166,14 @@ public String toString() {
@Override
public void write(final int b) throws IOException {
if (b == '\r') {
- System.err.print('\r');
return;
}
sb.append((char) b);
if (b == '\n') {
- final String line = sb.toString();
- System.err.print(line);
- all.append(line);
- sb = new StringBuilder();
+ all.append(sb);
+ sb.setLength(0);
}
}
};
--
1.6.3.2.322.g117de
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-06-07 22:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-07 22:31 [JGIT PATCH] Don't log TransportGitSsh error stream to JVM stderr Shawn O. Pearce
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).