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

Re: [PATCH v2] refs: fix duplicated word in comment

From
MÅMartin Ågren <martin.agren@gmail.com>
Date
Apr 7, 2025, 18:43 UTC
Message-ID
<CAN0heSoh4SuQcYHVVniO1BYH_C4O-BeF4kKxDg3uQPzpotLA1A@mail.gmail.com>
In-Reply-To
<pull.1940.v2.git.git.1743857867327.gitgitgadget@gmail.com>

On Sat, 5 Apr 2025 at 14:58, Christian Fredrik Johnsen via GitGitGadget <gitgitgadget@gmail.com> wrote:

Show 6 quoted lines
>
> From: Christian Fredrik Johnsen <christian@johnsen.no>
>
> Fix a typo in a comment in refs.c: "checking checking" → "checking".
>
> Signed-off-by: Christian Fredrik Johnsen <christian@johnsen.no>
This addresses my comment on v1.
Show 7 quoted lines
>     Changes since v1:
>
>      * Add a blank line in the commit message to separate commit body from
>        Signed-off-by: footer
>      * Moved the word common from line 2553 to 2552, to make the comment be
>        similar in style to other comments in refs.c. (Usually the last
>        comment line is somewhat shorter than the first ones).
Show 9 quoted lines
>                         /*
>                          * If we've already seen the directory we don't need to
> -                        * process it again. Skip it to avoid checking checking
> -                        * common prefixes like "refs/heads/" repeatedly.
> +                        * process it again. Skip it to avoid checking common
> +                        * prefixes like "refs/heads/" repeatedly.
>                          */
>                         if (!strset_add(&dirnames, dirname.buf))
>                                 continue;

Ok. In general, there's some trade-off to be made between "make a small change at the top of a twenty-line comment and rewrap the whole thing causing more churn than necessary and create more room for conflicts with other topics" and "make the change and live with slightly less beautiful wrapping". In this particular case, the blast radius is small. `git show --word-diff` confirms that you simply removed the duplicate word and moved "common" (or "*").

FWIW, this patch looks good to me.
Martin
Previous: Christian Fredrik Johnsen via GitGitGadgetNext: Junio C Hamano
Message 4 of 5 in “refs: fix duplicated word in comment”
  1. refs: fix duplicated word in commentChristian Fredrik Johnsen via GitGitGadget, Apr 4, 2025
  2. Martin ÅgrenApr 5, 2025
  3. refs: fix duplicated word in commentChristian Fredrik Johnsen via GitGitGadget, Apr 5, 2025
  4. Martin ÅgrenApr 7, 2025
  5. Junio C HamanoApr 9, 2025

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.