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

Re: What's cooking in git.git (Dec 2015, #05; Tue, 15)

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 15, 2015, 23:36 UTC
Message-ID
<xmqqbn9rffo0.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20151215233207.GA30294@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 19 quoted lines
>> * jc/strbuf-gets (2015-10-28) 17 commits
>> [...]
>> 
>>  Teach codepaths that communicate with users by reading text files
>>  to be more lenient to editors that write CRLF-terminated lines.
>>  Note that this is only about communication with Git, like feeding
>>  list of object names from the standard input instead of from the
>>  command line, and does not involve files in the working tree.
>> 
>>  Waiting for review.
>
> I like the intent here, but I was a little disappointed that we end up
> with two almost identical strbuf functions. But even if the ultimate
> endgame is to drop back to one, the conservative route is to keep them
> both until all new code paths have "opted in" to the new behavior.
> However, I found the naming confusing: it was not at all clear to me
> which of strbuf_gets and strbuf_getline did the CRLF-munging. Perhaps
> it would be more obvious if the new one was strbuf_getline_crlf or
> something. I dunno.

There already was strbuf_getline_crlf(), and I wanted a new name to be conservative. It was modelled after gets() (not fgets()) that removes the trailing line terminator, but there may have been better names. I dunno, either.

Thanks.
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 13 in “What's cooking in git.git (Dec 2015, #05; Tue, 15)”
  1. Junio C HamanoDec 15, 2015
  2. Stefan BellerDec 15, 2015
  3. Jeff KingDec 15, 2015
  4. Junio C HamanoDec 15, 2015
  5. Junio C HamanoDec 15, 2015
  6. Junio C HamanoDec 15, 2015
  7. Jeff KingDec 16, 2015
  8. Johannes SchindelinDec 16, 2015
  9. Torsten BögershausenDec 16, 2015
  10. Junio C HamanoDec 16, 2015
  11. Torsten BögershausenDec 21, 2015
  12. SZEDER GáborDec 18, 2015
  13. Junio C HamanoDec 21, 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.