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

Re: [PATCH v2] *: fix typos which duplicate a word

From
Andrei Rybak <rybak.a.v@gmail.com>
Date
Jun 11, 2021, 09:31 UTC
Message-ID
<beb55a5a-2507-e194-7e3b-92a028210e43@gmail.com>
In-Reply-To
<xmqq1r99e0ff.fsf@gitster.g>
On 11/06/2021 01:59, Junio C Hamano wrote:
Show 22 quoted lines
> Andrei Rybak <rybak.a.v@gmail.com> writes:
> 
>> Fix typos in documentation and code comments which repeat various words.
> 
> Thanks.
> 
>> These typos were found by searching using scripts like this:
>>
>> 	for w in $(grep '^....$' /usr/share/dict/words)
>> 	do
>> 		git grep -P "\b$w $w\b"
>> 	done
> 
> This is clarifying and somewhat puzzling at the same time.
> 
> It says that doubled words that span across line folding, and
> doubled words that do not have exactly a single space in between,
> have gone undetected (which is fine and may be useful information)
> by showing that it grepped for lines that has doubled words.  But it
> also says that you only looked for four-letter words, which I do not
> believe is the case (you fixed "the the", for example), which is
> misleading.  The "like this" part can be an excuse for that

Indeed. Basically, it was several scripts with different lists of words. I considered writing:

  	for w in <list of words>
  	do
  		git grep -P "\b$w $w\b"
  	done

but opted for an explicit example of a script used, which may be reused later.

> inaccuracy, but then the whole thing pretty much has already been
> summarized nicely with your first line already, i.e. "which repeate
> various words".  If you update it the end part of the sentence to
> "which repeat various words on the same line",

Since v2, I've written a script to also check sentences which span several lines. I'll send out a v3 with a bunch more fixes.

Show 5 quoted lines
> then the entire
> paragaph can go without losing clarity.
> Not a huge deal, though.
> 
> The changes themselves all look good to me.  Thanks.  Will apply.
Previous: Junio C HamanoNext: Andrei Rybak
Message 7 of 9 in “fix typos which duplicate a word”
  1. fix typos which duplicate a wordAndrei Rybak, Jun 9, 2021
  2. Eric SunshineJun 9, 2021
  3. Felipe ContrerasJun 9, 2021
  4. *: fix typos which duplicate a wordAndrei Rybak, Jun 10, 2021
  5. Felipe ContrerasJun 10, 2021
  6. Junio C HamanoJun 10, 2021
  7. Andrei RybakJun 11, 2021
  8. *: fix typos which duplicate a wordAndrei Rybak, Jun 11, 2021
  9. Junio C HamanoJun 14, 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.