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

Re: hot to get file sizes in git log output

From
Jeff King <peff@peff.net>
Date
Oct 21, 2017, 03:25 UTC
Message-ID
<20171021032505.e6vysjteesr4r5pj@sigill.intra.peff.net>
In-Reply-To
<nycvar.QRO.7.76.6.1710201929210.5973@qynat-yncgbc>
On Fri, Oct 20, 2017 at 07:38:00PM -0700, David Lang wrote:
Show 14 quoted lines
> git whatchanged shows commits like:
> 
> commit fb7e54c12ddc7c87c4862806d583f5c6abf3e731
> Author: David Lang <david@lang.hm>
> Date:   Fri Oct 20 11:00:01 2017 -0700
> 
>     update
> 
> :100644 100644 1a842ca... 290e9dd... M  Default/Bookmarks
> :100644 100644 1cd745c... 388a455... M  Default/Current Session
> :100644 100644 51074ad... c4dce40... M  Default/Current Tabs
> 
> If there was a way to add file size to this output, it would be perfect for
> what I'm needing.

There isn't. You'll have to process the output to pass the post-image hashes to cat-file to get the size (i.e., what I showed before, though of course you could make the output prettier if you wanted to).

-Peff
Previous: David Lang
Message 8 of 8 in “hot to get file sizes in git log output”
  1. David LangOct 20, 2017
  2. Jacob KellerOct 20, 2017
  3. Jeff KingOct 20, 2017
  4. Eric SunshineOct 20, 2017
  5. Jacob KellerOct 20, 2017
  6. David LangOct 21, 2017
  7. David LangOct 21, 2017
  8. Jeff KingOct 21, 2017

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.