{"thread":{"id":"63255","subject":"[PATCH] refs: fix duplicated word in comment","startedAt":"2025-04-04T18:39:49Z","lastAt":"2025-04-09T16:22:18Z","messageCount":5,"participants":["Christian Fredrik Johnsen via GitGitGadget","Martin Ågren","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"515685","messageId":"pull.1940.git.git.1743791986754.gitgitgadget@gmail.com","threadId":"63255","inReplyTo":null,"subject":"[PATCH] refs: fix duplicated word in comment","fromName":"Christian Fredrik Johnsen via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2025-04-04T18:39:46Z","receivedAt":"2025-04-04T18:39:49Z","isPatch":true,"sender":{"key":"cfj@johnsen.no","avatar":null},"body":"From: Christian Fredrik Johnsen <christian@johnsen.no>\n\nFix a typo in a comment in refs.c: \"checking checking\" → \"checking\".\nSigned-off-by: Christian Fredrik Johnsen <christian@johnsen.no>\n---\n    refs: fix duplicated word in comment\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1940%2FChristianFredrikJohnsen%2Fmaster-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1940/ChristianFredrikJohnsen/master-v1\nPull-Request: https://github.com/git/git/pull/1940\n\n refs.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/refs.c b/refs.c\nindex f0fe77bd7cf..5c0fd545965 100644\n--- a/refs.c\n+++ b/refs.c\n@@ -2549,7 +2549,7 @@ int refs_verify_refnames_available(struct ref_store *refs,\n \n \t\t\t/*\n \t\t\t * If we've already seen the directory we don't need to\n-\t\t\t * process it again. Skip it to avoid checking checking\n+\t\t\t * process it again. Skip it to avoid checking\n \t\t\t * common prefixes like \"refs/heads/\" repeatedly.\n \t\t\t */\n \t\t\tif (!strset_add(&dirnames, dirname.buf))\n\nbase-commit: 5b97a56fa0e7d580dc8865b73107407c9b3f0eff\n-- \ngitgitgadget\n"},{"id":"515692","messageId":"CAN0heSp9RhH=UMDqLs=Kd57RoseySrFT4sFeXrVV3h7f=daSaw@mail.gmail.com","threadId":"63255","inReplyTo":"pull.1940.git.git.1743791986754.gitgitgadget@gmail.com","subject":"Re: [PATCH] refs: fix duplicated word in comment","fromName":"Martin Ågren","fromEmail":"martin.agren@gmail.com","sentAt":"2025-04-05T10:01:19Z","receivedAt":"2025-04-05T10:01:33Z","isPatch":true,"sender":{"key":"martin.agren@gmail.com","avatar":null},"body":"Hi Christian Fredrik,\n\nThanks for posting a patch.\n\nOn Fri, 4 Apr 2025 at 20:39, Christian Fredrik Johnsen via\nGitGitGadget <gitgitgadget@gmail.com> wrote:\n>\n> From: Christian Fredrik Johnsen <christian@johnsen.no>\n>\n> Fix a typo in a comment in refs.c: \"checking checking\" → \"checking\".\n> Signed-off-by: Christian Fredrik Johnsen <christian@johnsen.no>\n\nThere should be an empty line between the main part of the commit\nmessage and the Signed-off-by trailer.\n\n>                         /*\n>                          * If we've already seen the directory we don't need to\n> -                        * process it again. Skip it to avoid checking checking\n> +                        * process it again. Skip it to avoid checking\n>                          * common prefixes like \"refs/heads/\" repeatedly.\n>                          */\n\nWell-spotted. No doubt that this is the correct fix.\n\nMartin\n"},{"id":"515697","messageId":"pull.1940.v2.git.git.1743857867327.gitgitgadget@gmail.com","threadId":"63255","inReplyTo":"pull.1940.git.git.1743791986754.gitgitgadget@gmail.com","subject":"[PATCH v2] refs: fix duplicated word in comment","fromName":"Christian Fredrik Johnsen via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2025-04-05T12:57:47Z","receivedAt":"2025-04-05T12:57:50Z","isPatch":true,"sender":{"key":"cfj@johnsen.no","avatar":null},"body":"From: Christian Fredrik Johnsen <christian@johnsen.no>\n\nFix a typo in a comment in refs.c: \"checking checking\" → \"checking\".\n\nSigned-off-by: Christian Fredrik Johnsen <christian@johnsen.no>\n---\n    refs: fix duplicated word in comment\n    \n    cc: Martin Ågren martin.agren@gmail.com\n    \n    Changes since v1:\n    \n     * Add a blank line in the commit message to separate commit body from\n       Signed-off-by: footer\n     * Moved the word common from line 2553 to 2552, to make the comment be\n       similar in style to other comments in refs.c. (Usually the last\n       comment line is somewhat shorter than the first ones).\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1940%2FChristianFredrikJohnsen%2Fmaster-v2\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1940/ChristianFredrikJohnsen/master-v2\nPull-Request: https://github.com/git/git/pull/1940\n\nRange-diff vs v1:\n\n 1:  327563ce3fd ! 1:  029c23cf027 refs: fix duplicated word in comment\n     @@ Commit message\n          refs: fix duplicated word in comment\n      \n          Fix a typo in a comment in refs.c: \"checking checking\" → \"checking\".\n     +\n          Signed-off-by: Christian Fredrik Johnsen <christian@johnsen.no>\n      \n       ## refs.c ##\n     @@ refs.c: int refs_verify_refnames_available(struct ref_store *refs,\n       \t\t\t/*\n       \t\t\t * If we've already seen the directory we don't need to\n      -\t\t\t * process it again. Skip it to avoid checking checking\n     -+\t\t\t * process it again. Skip it to avoid checking\n     - \t\t\t * common prefixes like \"refs/heads/\" repeatedly.\n     +-\t\t\t * common prefixes like \"refs/heads/\" repeatedly.\n     ++\t\t\t * process it again. Skip it to avoid checking common\n     ++\t\t\t * prefixes like \"refs/heads/\" repeatedly.\n       \t\t\t */\n       \t\t\tif (!strset_add(&dirnames, dirname.buf))\n     + \t\t\t\tcontinue;\n\n\n refs.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/refs.c b/refs.c\nindex f0fe77bd7cf..1fb270c5782 100644\n--- a/refs.c\n+++ b/refs.c\n@@ -2549,8 +2549,8 @@ int refs_verify_refnames_available(struct ref_store *refs,\n \n \t\t\t/*\n \t\t\t * If we've already seen the directory we don't need to\n-\t\t\t * process it again. Skip it to avoid checking checking\n-\t\t\t * common prefixes like \"refs/heads/\" repeatedly.\n+\t\t\t * process it again. Skip it to avoid checking common\n+\t\t\t * prefixes like \"refs/heads/\" repeatedly.\n \t\t\t */\n \t\t\tif (!strset_add(&dirnames, dirname.buf))\n \t\t\t\tcontinue;\n\nbase-commit: 5b97a56fa0e7d580dc8865b73107407c9b3f0eff\n-- \ngitgitgadget\n"},{"id":"515792","messageId":"CAN0heSoh4SuQcYHVVniO1BYH_C4O-BeF4kKxDg3uQPzpotLA1A@mail.gmail.com","threadId":"63255","inReplyTo":"pull.1940.v2.git.git.1743857867327.gitgitgadget@gmail.com","subject":"Re: [PATCH v2] refs: fix duplicated word in comment","fromName":"Martin Ågren","fromEmail":"martin.agren@gmail.com","sentAt":"2025-04-07T18:43:20Z","receivedAt":"2025-04-07T18:43:33Z","isPatch":true,"sender":{"key":"martin.agren@gmail.com","avatar":null},"body":"On Sat, 5 Apr 2025 at 14:58, Christian Fredrik Johnsen via\nGitGitGadget <gitgitgadget@gmail.com> wrote:\n>\n> From: Christian Fredrik Johnsen <christian@johnsen.no>\n>\n> Fix a typo in a comment in refs.c: \"checking checking\" → \"checking\".\n>\n> Signed-off-by: Christian Fredrik Johnsen <christian@johnsen.no>\n\nThis addresses my comment on v1.\n\n>     Changes since v1:\n>\n>      * Add a blank line in the commit message to separate commit body from\n>        Signed-off-by: footer\n>      * Moved the word common from line 2553 to 2552, to make the comment be\n>        similar in style to other comments in refs.c. (Usually the last\n>        comment line is somewhat shorter than the first ones).\n\n>                         /*\n>                          * If we've already seen the directory we don't need to\n> -                        * process it again. Skip it to avoid checking checking\n> -                        * common prefixes like \"refs/heads/\" repeatedly.\n> +                        * process it again. Skip it to avoid checking common\n> +                        * prefixes like \"refs/heads/\" repeatedly.\n>                          */\n>                         if (!strset_add(&dirnames, dirname.buf))\n>                                 continue;\n\nOk. In general, there's some trade-off to be made between \"make a small change\nat the top of a twenty-line comment and rewrap the whole thing causing more\nchurn than necessary and create more room for conflicts with other topics\" and\n\"make the change and live with slightly less beautiful wrapping\". In this\nparticular case, the blast radius is small. `git show --word-diff` confirms\nthat you simply removed the duplicate word and moved \"common\" (or \"*\").\n\nFWIW, this patch looks good to me.\n\nMartin\n"},{"id":"515922","messageId":"xmqqbjt5s3t5.fsf@gitster.g","threadId":"63255","inReplyTo":"CAN0heSoh4SuQcYHVVniO1BYH_C4O-BeF4kKxDg3uQPzpotLA1A@mail.gmail.com","subject":"Re: [PATCH v2] refs: fix duplicated word in comment","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-04-09T16:22:14Z","receivedAt":"2025-04-09T16:22:18Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Martin Ågren <martin.agren@gmail.com> writes:\n\n> Ok. In general, there's some trade-off to be made between \"make a small change\n> at the top of a twenty-line comment and rewrap the whole thing causing more\n> churn than necessary and create more room for conflicts with other topics\" and\n> \"make the change and live with slightly less beautiful wrapping\".\n\nNice to see this choice spelled out.\n\n> In this\n> particular case, the blast radius is small. `git show --word-diff` confirms\n> that you simply removed the duplicate word and moved \"common\" (or \"*\").\n>\n> FWIW, this patch looks good to me.\n>\n> Martin\n\nThanks, both.\nWill queue.\n"}]}