On Fri, Oct 20, 2017 at 2:50 PM, Eric Sunshine <sunshine@xxxxxxxxxxxxxx> wrote: > On Fri, Oct 20, 2017 at 5:43 PM, Jeff King <peff@xxxxxxxx> wrote: >> On Fri, Oct 20, 2017 at 01:44:36PM -0700, Jacob Keller wrote: >>> On Fri, Oct 20, 2017 at 11:12 AM, David Lang <david@xxxxxxx> wrote: >>> > 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? >>> >>> 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. >> >> That's a good suggestion, and hopefully could help David answer his >> original question. >> >> I took the request to mean "walk through history, and for each file that >> a commit touches, show its size". Which is a bit harder to do, and I >> think you need to script a little: > > David's mention of "a particular file", suggests to me that something > "bad" happened to one file, and he wants to know in which commit that > "badness" happened. If so, then it sounds like a job for git-bisect. Yea, if you have a simple script which can tell when the file is "bad", you could run it through git bisect run pretty easily and rapidly find the right answer. Thanks, Jake