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

Re: [RFC PATCH] Using no- for options instead of duplication

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Nov 13, 2018, 10:18 UTC
Message-ID
<877ehh2scg.fsf@evledraar.gmail.com>
In-Reply-To
<xmqqmuqdwq2e.fsf@gitster-ct.c.googlers.com>
On Tue, Nov 13 2018, Junio C Hamano wrote:
Show 13 quoted lines
> 	A tangetn that somebody might want to tackle.  It would be
> 	nice if we had a tool that takes a grep expression (like
> 	'^--no' and '^\[no-' above) and shows histograms of the ages
> 	of lines that match.  It might tell us that all 44 combined
> 	ones are more recent (some of them may even have been
> 	updated from the separate form) than the 124 separate ones,
> 	in which case we can say "we started the process of
> 	migrating to list options singly, like '--[no-]option', in
> 	commit X; let's continue doing so" in the log message.  Or
> 	it may turn out that we have been going in the other
> 	direction and most of these 44 are stale ones yet to be
> 	split.  Without such a tool, the above numbers are the best
> 	measure to go by, which is not quite ideal.

This doesn't spew out a histogram, but you can use the various "git grep/blame" one-liners (https://www.google.nl/search?q=git+grep+blame) plus shell one-liner to get something useful:

    git grep -e '^--no-' -e '^--\[no-' -n | perl -F':' -anpe '$_=`git blame -L$F[1],+1 $F[0]`' | perl -pe 's/^.* (\d{4})-.*\) /$1 /' | sort -n
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 4 in “Using no- for options instead of duplication”
  1. Using no- for options instead of duplicationFredi Fowler, Nov 12, 2018
  2. Junio C HamanoNov 13, 2018
  3. Ævar Arnfjörð BjarmasonNov 13, 2018
  4. Junio C HamanoNov 13, 2018

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.