git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Keeping <john@keeping.me.uk>
To: Anish Athalye <anish.athalye@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: git-remote-helper behavior on Windows, not recognizing blank line as terminator
Date: Mon, 24 Aug 2015 10:24:18 +0100	[thread overview]
Message-ID: <20150824092418.GF1412@serenity.lan> (raw)
In-Reply-To: <CAFQ6zU1bdUwn+P3=1v2DoyVubMFz29ZuxHmnZ0pfezA-0MB+mQ@mail.gmail.com>

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.

  reply	other threads:[~2015-08-24  9:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2015-08-25  1:52   ` Anish Athalye

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150824092418.GF1412@serenity.lan \
    --to=john@keeping.me.uk \
    --cc=anish.athalye@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).