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

Re: hot to get file sizes in git log output

From
Jacob Keller <jacob.keller@gmail.com>
Date
Oct 20, 2017, 20:44 UTC
Message-ID
<CA+P7+xpdWJbxtxAggRpYR3eE8qjH6TfbYQS_=20aZM7d2RbC0Q@mail.gmail.com>
In-Reply-To
<nycvar.QRO.7.76.6.1710201105351.5973@qynat-yncgbc>
On Fri, Oct 20, 2017 at 11:12 AM, David Lang <david@lang.hm> wrote:
Show 7 quoted lines
> I'm needing to scan through git history looking for the file sizes (looking
> for when a particular file shrunk drastically)
>
> I'm not seeing an option in git log or git whatchanged that gives me the
> file size, am I overlooking something?
>
> David Lang

I'm not exactly sure what you mean by size, but if you want to show how many lines were added and removed by a given commit for each file, you can use the "--stat" option to produce a diffstat. The "size" of the files in each commit isn't very meaningful to the commit itself, but a stat of how much was removed might be more accurate to what you're looking for.

Thanks, Jake

Previous: David LangNext: Jeff King
Message 2 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.