git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git-remote-helper behavior on Windows, not recognizing blank line as terminator

From
AAAnish Athalye <anish.athalye@gmail.com>
Date
Aug 25, 2015, 01:52 UTC
Message-ID
<304662DC-3759-4482-A06C-3286FD45457F@gmail.com>
In-Reply-To
<20150824092418.GF1412@serenity.lan>
Wow, yeah, that was it. Thanks for your help!
Show 27 quoted lines
> 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.
Previous: John Keeping
Message 3 of 3 in “git-remote-helper behavior on Windows, not recognizing blank line as terminator”
  1. Anish AthalyeAug 23, 2015
  2. John KeepingAug 24, 2015
  3. Anish AthalyeAug 25, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.