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

Re: [PATCH] use fspathhash() everywhere

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 30, 2021, 19:27 UTC
Message-ID
<xmqq35rv1u2a.fsf@gitster.g>
In-Reply-To
<b85ed04f-ef9c-f460-e21b-bd1f8dfba9e2@web.de>
René Scharfe <l.s.r@web.de> writes:
Show 11 quoted lines
> cf2dc1c238 (speed up alt_odb_usable() with many alternates, 2021-07-07)
> introduced the function fspathhash() for calculating path hashes while
> respecting the configuration option core.ignorecase.  Call it instead of
> open-coding it; the resulting code is shorter and less repetitive.
>
> Signed-off-by: René Scharfe <l.s.r@web.de>
> ---
>  builtin/sparse-checkout.c | 10 ++--------
>  dir.c                     | 13 +++----------
>  merge-recursive.c         | 11 +++--------
>  3 files changed, 8 insertions(+), 26 deletions(-)

I love this kind of "now we have this thing available, let's use it at more places" clean-up patch.

Was coccinelle involved in finding these places?
Thanks.
Previous: René ScharfeNext: René Scharfe
Message 2 of 3 in “use fspathhash() everywhere”
  1. use fspathhash() everywhereRené Scharfe, Jul 30, 2021
  2. Junio C HamanoJul 30, 2021
  3. René ScharfeJul 30, 2021

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.