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

Re: [PATCH v2 2/3] credentials: make line reading Windows compatible

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 30, 2020, 22:33 UTC
Message-ID
<xmqqa6x6gajn.fsf@gitster.c.googlers.com>
In-Reply-To
<20200929003519.GB898702@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 29 quoted lines
> On Mon, Sep 28, 2020 at 01:58:03PM -0700, Junio C Hamano wrote:
>
>> "Nikita Leonov via GitGitGadget" <gitgitgadget@gmail.com> writes:
>> 
>> > From: Nikita Leonov <nykyta.leonov@gmail.com>
>> >
>> > This commit makes reading process regarding credentials compatible with
>> > 'CR/LF' line ending. It makes using git more convenient on systems like
>> > Windows.
>> 
>> I can see why this is a good thing for "store" and the two updated
>> pieces of the test script demonstrate it very well.  
>> 
>> But it is unclear why and how cache-daemon benefits from this change.
>> That needs to be justified.
>
> I suspect it doesn't need touched, because it is internal to git-daemon.
> But it does handle CRLF for some lines, because the first patch
> modified credential_read(), which the daemon builds on (and which _is_
> user-facing via git-credential). So there's perhaps an argument that
> these calls should just be made consistent, even though the only one who
> would write them is our matching client. If that is the argument to be
> made, I think it would make sense to do so in a separate patch, since
> there's no functional change.
>
> (I'm also slightly puzzled that anybody on Windows would care about
> credential-cache, since it require unix sockets. But maybe in a world of
> WSL people are actually able to mix the two. I confess I haven't kept up
> with the state of things in Windows).

True, so some, if not all, parts of these changes start to look more and more like "I change LF to CRLF purely for political correctness, even I know nobody sends CRLF in these cases (or "even I do not know if anybody sends CRLF in these cases", which essentially amounts to the same thing but may be worse)", needless code churns.

Sigh.
Previous: Jeff KingNext: Johannes Schindelin
Message 16 of 32 in “credential.c: fix credential reading with regards to CR/LF”
  1. credential.c: fix credential reading with regards to CR/LFJohannes Schindelin via GitGitGadget, Feb 14, 2020
  2. Junio C HamanoFeb 14, 2020
  3. Jeff KingFeb 14, 2020
  4. 0/3 Prepare git credential to read input with DOS line endingsJohannes Schindelin via GitGitGadget, Sep 28, 2020
  5. 1/3 credential.c: fix credential reading with regards to CR/LFNikita Leonov via GitGitGadget, Sep 28, 2020
  6. Jeff KingSep 29, 2020
  7. Johannes SchindelinOct 2, 2020
  8. Jeff KingOct 2, 2020
  9. Johannes SchindelinOct 2, 2020
  10. Junio C HamanoOct 2, 2020
  11. Johannes SchindelinOct 3, 2020
  12. 3/3 docs: make notes regarding credential line readingNikita Leonov via GitGitGadget, Sep 28, 2020
  13. 2/3 credentials: make line reading Windows compatibleNikita Leonov via GitGitGadget, Sep 28, 2020
  14. Junio C HamanoSep 28, 2020
  15. Jeff KingSep 29, 2020
  16. Junio C HamanoSep 30, 2020
  17. Johannes SchindelinOct 2, 2020
  18. Carlo ArenasSep 28, 2020
  19. Junio C HamanoSep 28, 2020
  20. Jeff KingSep 29, 2020
  21. Junio C HamanoSep 29, 2020
  22. Jeff KingSep 29, 2020
  23. Junio C HamanoSep 29, 2020
  24. Jeff KingSep 29, 2020
  25. Junio C HamanoSep 30, 2020
  26. Jeff KingSep 30, 2020
  27. Junio C HamanoSep 30, 2020
  28. Jeff KingOct 1, 2020
  29. Junio C HamanoOct 1, 2020
  30. Johannes SchindelinOct 2, 2020
  31. Junio C HamanoSep 28, 2020
  32. credential: treat CR/LF as line endings in the credential protocolJohannes Schindelin via GitGitGadget, Oct 3, 2020

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.