* git-remote-helper behavior on Windows, not recognizing blank line as terminator
@ 2015-08-23 18:40 Anish Athalye
2015-08-24 9:24 ` John Keeping
0 siblings, 1 reply; 3+ messages in thread
From: Anish Athalye @ 2015-08-23 18:40 UTC (permalink / raw)
To: git
Hello,
I'm having some issues with git remote helper behavior on Windows.
According to the protocol
(https://www.kernel.org/pub/software/scm/git/docs/gitremote-helpers.html),
when doing things like listing capabilities, git expects the remote
helper to send back a blank line when it's done.
I'm having trouble having git recognize the blank line (see
https://github.com/anishathalye/git-remote-dropbox/issues/13#issuecomment-133894730
for details).
Has anyone come across this behavior before? Am I doing something
wrong, or could there be a bug in git? What's the best way to proceed?
Any help or suggestions would be greatly appreciated!
Regards,
Anish
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git-remote-helper behavior on Windows, not recognizing blank line as terminator
2015-08-23 18:40 git-remote-helper behavior on Windows, not recognizing blank line as terminator Anish Athalye
@ 2015-08-24 9:24 ` John Keeping
2015-08-25 1:52 ` Anish Athalye
0 siblings, 1 reply; 3+ messages in thread
From: John Keeping @ 2015-08-24 9:24 UTC (permalink / raw)
To: Anish Athalye; +Cc: git
On Sun, Aug 23, 2015 at 11:40:17AM -0700, Anish Athalye wrote:
> I'm having some issues with git remote helper behavior on Windows.
>
> According to the protocol
> (https://www.kernel.org/pub/software/scm/git/docs/gitremote-helpers.html),
> when doing things like listing capabilities, git expects the remote
> helper to send back a blank line when it's done.
>
> I'm having trouble having git recognize the blank line (see
> https://github.com/anishathalye/git-remote-dropbox/issues/13#issuecomment-133894730
> for details).
>
> Has anyone come across this behavior before? Am I doing something
> wrong, or could there be a bug in git? What's the best way to proceed?
>
>
> Any help or suggestions would be greatly appreciated!
The remote-helper parser tends to be very strict about its input. I
suspect that on Windows you are sending CRLF rather than LF, so Git sees
a line containing CR.
By default the stdio streams are probably open in "text" mode, which
will convert "\n" to "\r\n". You probably need to reopen stdout in
binary mode to make sure the output is correct.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git-remote-helper behavior on Windows, not recognizing blank line as terminator
2015-08-24 9:24 ` John Keeping
@ 2015-08-25 1:52 ` Anish Athalye
0 siblings, 0 replies; 3+ messages in thread
From: Anish Athalye @ 2015-08-25 1:52 UTC (permalink / raw)
To: John Keeping; +Cc: git@vger.kernel.org
Wow, yeah, that was it. Thanks for your help!
> On Aug 24, 2015, at 2:24 AM, John Keeping <john@keeping.me.uk> wrote:
>
>> On Sun, Aug 23, 2015 at 11:40:17AM -0700, Anish Athalye wrote:
>> I'm having some issues with git remote helper behavior on Windows.
>>
>> According to the protocol
>> (https://www.kernel.org/pub/software/scm/git/docs/gitremote-helpers.html),
>> when doing things like listing capabilities, git expects the remote
>> helper to send back a blank line when it's done.
>>
>> I'm having trouble having git recognize the blank line (see
>> https://github.com/anishathalye/git-remote-dropbox/issues/13#issuecomment-133894730
>> for details).
>>
>> Has anyone come across this behavior before? Am I doing something
>> wrong, or could there be a bug in git? What's the best way to proceed?
>>
>>
>> Any help or suggestions would be greatly appreciated!
>
> The remote-helper parser tends to be very strict about its input. I
> suspect that on Windows you are sending CRLF rather than LF, so Git sees
> a line containing CR.
>
> By default the stdio streams are probably open in "text" mode, which
> will convert "\n" to "\r\n". You probably need to reopen stdout in
> binary mode to make sure the output is correct.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-08-25 1:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-23 18:40 git-remote-helper behavior on Windows, not recognizing blank line as terminator Anish Athalye
2015-08-24 9:24 ` John Keeping
2015-08-25 1:52 ` Anish Athalye
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).