From: Johannes Schindelin <Johannes.Schindelin@gmx.de> To: Junio C Hamano <gitster@pobox.com> Cc: Jeff King <peff@peff.net>, Nikita Leonov via GitGitGadget <gitgitgadget@gmail.com>, git@vger.kernel.org, Nikita Leonov <nykyta.leonov@gmail.com> Subject: Re: [PATCH v2 1/3] credential.c: fix credential reading with regards to CR/LF Date: Sat, 3 Oct 2020 15:28:09 +0200 (CEST) [thread overview] Message-ID: <nycvar.QRO.7.76.6.2010031527200.50@tvgsbejvaqbjf.bet> (raw) In-Reply-To: <xmqqk0w8a8re.fsf@gitster.c.googlers.com> Hi Junio, On Fri, 2 Oct 2020, Junio C Hamano wrote: > Johannes Schindelin <Johannes.Schindelin@gmx.de> writes: > > > Therefore, I spent some time pouring over the commit message. This is my > > current version: > > > > credential: treat CR/LF as line endings in the credential protocol > > > > This fix makes using Git credentials more friendly to Windows users: it > > allows a credential helper to communicate using CR/LF line endings ("DOS > > line endings" commonly found on Windows) instead of LF-only line endings > > ("Unix line endings"). > > > > Note that this changes the behavior a bit: if a credential helper > > produces, say, a password with a trailing Carriage Return character, > > that will now be culled even when the rest of the lines end only in Line > > Feed characters, indicating that the Carriage Return was not meant to be > > part of the line ending. > > > > In practice, it seems _very_ unlikely that something like this happens. > > Passwords usually need to consist of non-control characters, URLs need > > to have special characters URL-encoded, and user names, well, are names. > > > > So let's change the credential machinery to accept both CR/LF and LF > > line endings. > > > > While we do this for the credential helper protocol, we do _not_ do > > adjust `git credential-cache--daemon` (which won't work on Windows, > > anyway, because it requires Unix sockets) nor `git credential-store` > > (which writes the file `~/.git-credentials` which we consider an > > implementation detail that should be opaque to the user, read: we do > > expect users _not_ to edit this file manually). > > > > What do you think? > > I am not Peff, but I was also drawn into the same confusion by the > "we never see an empty line" red herring. :-) > There are some micronits, but the above made a lot easier to > understand (I think you could even add "quit\r" bit to make it even > easier to understand) than the original description. Okay, I incorporated a comment talking about `quit\r` and will submit a new iteration right now. Thanks, Dscho
next prev parent reply other threads:[~2020-10-03 13:28 UTC|newest] Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-02-14 13:49 [PATCH] " Johannes Schindelin via GitGitGadget 2020-02-14 17:55 ` Junio C Hamano 2020-02-14 18:32 ` Jeff King 2020-09-28 11:40 ` [PATCH v2 0/3] Prepare git credential to read input with DOS line endings Johannes Schindelin via GitGitGadget 2020-09-28 11:40 ` [PATCH v2 1/3] credential.c: fix credential reading with regards to CR/LF Nikita Leonov via GitGitGadget 2020-09-29 0:42 ` Jeff King 2020-10-02 11:37 ` Johannes Schindelin 2020-10-02 12:01 ` Jeff King 2020-10-02 12:27 ` Johannes Schindelin 2020-10-02 16:32 ` Junio C Hamano 2020-10-03 13:28 ` Johannes Schindelin [this message] 2020-09-28 11:40 ` [PATCH v2 2/3] credentials: make line reading Windows compatible Nikita Leonov via GitGitGadget 2020-09-28 20:58 ` Junio C Hamano 2020-09-29 0:35 ` Jeff King 2020-09-30 22:33 ` Junio C Hamano 2020-10-02 7:53 ` Johannes Schindelin 2020-09-28 23:26 ` Carlo Arenas 2020-09-28 23:41 ` Junio C Hamano 2020-09-29 0:30 ` Jeff King 2020-09-29 0:41 ` Junio C Hamano 2020-09-29 0:44 ` Jeff King 2020-09-29 0:54 ` Junio C Hamano 2020-09-29 3:00 ` Jeff King 2020-09-30 22:25 ` Junio C Hamano 2020-09-30 22:39 ` Jeff King 2020-09-30 22:56 ` Junio C Hamano 2020-10-01 13:54 ` Jeff King 2020-10-01 15:42 ` Junio C Hamano 2020-10-02 8:07 ` Johannes Schindelin 2020-09-28 11:40 ` [PATCH v2 3/3] docs: make notes regarding credential line reading Nikita Leonov via GitGitGadget 2020-09-28 20:31 ` [PATCH v2 0/3] Prepare git credential to read input with DOS line endings Junio C Hamano 2020-10-03 13:29 ` [PATCH v3] credential: treat CR/LF as line endings in the credential protocol Johannes Schindelin via GitGitGadget
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=nycvar.QRO.7.76.6.2010031527200.50@tvgsbejvaqbjf.bet \ --to=johannes.schindelin@gmx.de \ --cc=git@vger.kernel.org \ --cc=gitgitgadget@gmail.com \ --cc=gitster@pobox.com \ --cc=nykyta.leonov@gmail.com \ --cc=peff@peff.net \ --subject='Re: [PATCH v2 1/3] credential.c: fix credential reading with regards to CR/LF' \ /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
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).