Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] Can we read the message as a stream while pushing to server?


I spotted the messages being written to MessageWriter while they come in from the backend.
In case of ssh-connection I see in SshPushConnection#doPush:

if (capableSideBand) {
  int b =;

"in" is a SideBandInputStream which writes the messages to the MessageWriter in SideBandInputStream#doProgressLine.


The current implementation of the PushProcess gets the messages (as concatenated string)  from the MessageWriter once the push is finished, PushProcess#execute:

} finally {

Assuming my understanding is correct, I'd make sure I can pass the messageWriter my very own OutputStream so that he can write the messages to it. That would allow me to show them in the Eclipse Console (or some dialog) as they come in.

I'd love to get your feedback, thoughts.


-------- Original Message --------
Subject: Can we read the message as a stream while pushing to server?
Date: Fri, 11 Jan 2013 02:47:22 +0100
From: André Dietisheim <adietish@xxxxxxxxxx>
To: jgit-dev@xxxxxxxxxxx


if you git push via cmd line, you see the response getting in while the 
push is occurring.
I was wondering if one could achieve the same with jgit. I only saw 
PushResult#getMessage that I may only call once the push was executed. 
Transport#push, which returns the result, is blocking. Is there a way to 
achieve the same as in git cmd line? Do I miss something? I'd appreciate 
any pointers a lot. Thanks!


Back to the top