Message ID | pull.1940.v2.git.git.1743857867327.gitgitgadget@gmail.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [v2] refs: fix duplicated word in comment | expand |
On Sat, 5 Apr 2025 at 14:58, Christian Fredrik Johnsen via GitGitGadget <gitgitgadget@gmail.com> wrote: > > 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. > 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). > /* > * 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
Martin Ågren <martin.agren@gmail.com> writes: > 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". Nice to see this choice spelled out. > 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 Thanks, both. Will queue.
diff --git a/refs.c b/refs.c index f0fe77bd7cf..1fb270c5782 100644 --- a/refs.c +++ b/refs.c @@ -2549,8 +2549,8 @@ int refs_verify_refnames_available(struct ref_store *refs, /* * 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;