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

Re: [PATCH] submodule--helper: normalize funny urls

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 18, 2016, 17:51 UTC
Message-ID
<xmqqinsppmuv.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<CAGZ79kZEFanPpdrE4sD64LJHmyrBiHafo1VzoGtoGh+wO_HCuw@mail.gmail.com>
Stefan Beller <sbeller@google.com> writes:
Show 9 quoted lines
> for(;;) {
>
> here ? (this code would not need a variable, and
> for wins over while:
> $ git grep "while (1)" |wc -l
> 107
> $ git grep "for (;;)" |wc -l
> 128
> )

I dunno; the numbers tells me there is no strong preference by wide margin either way.

I am not sure if the end shape does not really need an exit condition. If there is a need for one, "for (; condition;)" would look strange. If there isn't, "for (;;)" is actually my personal preference over "while (1)".

Previous: Stefan BellerNext: Junio C Hamano
Message 7 of 8 in “submodule--helper: normalize funny urls”
  1. submodule--helper: normalize funny urlsStefan Beller, Oct 17, 2016
  2. Junio C HamanoOct 17, 2016
  3. Stefan BellerOct 17, 2016
  4. Johannes SchindelinOct 18, 2016
  5. Junio C HamanoOct 18, 2016
  6. Stefan BellerOct 18, 2016
  7. Junio C HamanoOct 18, 2016
  8. Junio C HamanoOct 18, 2016

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.