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

Re: [PATCH updated] Add "--dirstat" for some directory statistics

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Feb 13, 2008, 01:10 UTC
Message-ID
<alpine.LFD.1.00.0802121701310.2920@woody.linux-foundation.org>
In-Reply-To
<7v1w7h1xs1.fsf@gitster.siamese.dyndns.org>
On Tue, 12 Feb 2008, Junio C Hamano wrote:
Show 7 quoted lines
> 
> You can drop the "line count" idea and instead count the "amount
> of damage" done to the preimage, just like we do in the rename
> similarity computation.
> 
> The attached patch is just an outline.  There may need special
> cases for unmerged paths.

Ouch. I like the concept and the result, but an not a huge fan of the the implementation. The problem with this is that it makes the whole damage computation something separate from the earlier phases.

So it actually seems to add a lot of cost. Right now there is basically zero added cost to just adding a "--dirstat" to one of my common operations, which is

	git diff -M --stat --summary
(that's what I do on merges). 

Wouldn't it be nicer to merge it with one of the stages we did earlier by simply saving the data. If not the --stat phase, then the -M phase?

			Linus
Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 8 in “Add "--dirstat" for some directory statistics”
  1. Add "--dirstat" for some directory statisticsLinus Torvalds, Feb 12, 2008
  2. Linus TorvaldsFeb 12, 2008
  3. Junio C HamanoFeb 13, 2008
  4. Linus TorvaldsFeb 13, 2008
  5. Junio C HamanoFeb 13, 2008
  6. Abdelrazak YounesFeb 13, 2008
  7. Johannes SchindelinFeb 13, 2008
  8. Wincent ColaiutaFeb 13, 2008

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.