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

Re: [PATCH 1/4] refspec: trivial cleanup

From
Jeff King <peff@peff.net>
Date
Dec 2, 2020, 02:01 UTC
Message-ID
<X8b1au+GDihNvhIQ@coredump.intra.peff.net>
In-Reply-To
<CAMP44s3usd5EW4sA6_qapnDBVRAWg4nk5ZSxAPPQN1UygD=ctA@mail.gmail.com>
On Tue, Dec 01, 2020 at 05:25:53PM -0600, Felipe Contreras wrote:
Show 14 quoted lines
> > I know your question was rhetorical, but a good reason not to do so in
> > general is that the existing pattern reveals some intent. E.g., it
> > sometimes is the case that with the _current_ code we can return early
> > from a function or loop, but that is not inherent to what the code is
> > doing, and the early return or continue makes it harder to understand
> > that.
> 
> Yes, but even in those cases it arguably helps readability.
> 
> Anyway, I prefer to argue on the tangible rather than hypotheticals
> because the hypotheticals are infinite.
>
> In this particular case there's no particular reason to just continue
> if there's no prefix.
Right, which I already agreed with.

I hesitated on responding at all, because you and I have not had a good history of agreeing on commit messages. But my comment was primarily for other readers on the list. I do not want people blindly applying a rule like "less indentation is good" without thinking about the code overall (I don't know whether you thought about it or not, but it was not apparent from your commit message).

-Peff
Previous: Felipe ContrerasNext: Felipe Contreras
Message 7 of 18 in “Random cleanups”
  1. 0/4 Random cleanupsFelipe Contreras, Dec 1, 2020
  2. 4/4 tests: lib-functions: trivial style cleanupsFelipe Contreras, Dec 1, 2020
  3. 1/4 refspec: trivial cleanupFelipe Contreras, Dec 1, 2020
  4. Jeff KingDec 1, 2020
  5. Junio C HamanoDec 1, 2020
  6. Felipe ContrerasDec 1, 2020
  7. Jeff KingDec 2, 2020
  8. Felipe ContrerasDec 2, 2020
  9. 3/4 test: completion: fix typosFelipe Contreras, Dec 1, 2020
  10. 2/4 .gitignore: remove dangling fileFelipe Contreras, Dec 1, 2020
  11. Junio C HamanoDec 1, 2020
  12. Felipe ContrerasDec 1, 2020
  13. Jeff KingDec 2, 2020
  14. Felipe ContrerasDec 2, 2020
  15. gitignore: remove entry for git serveRené Scharfe, Dec 2, 2020
  16. Johannes SchindelinDec 2, 2020
  17. Jeff KingDec 2, 2020
  18. Junio C HamanoDec 2, 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.