# RE: how to display file history?

2 messages from 2006-05-15 to 2006-05-15. Participants: Brown, Len, Linus Torvalds.
Thread: https://gitlist.dev/t/4149

## Brown, Len, 2006-05-15 17:24

Subject: RE: how to display file history?
Message-ID: <CFF307C98FEABE47A452B27C06B85BB670FB0A@hdsmsx411.amr.corp.intel.com>
URL: https://gitlist.dev/e/CFF307C98FEABE47A452B27C06B85BB670FB0A%40hdsmsx411.amr.corp.intel.com

```
>	git log --stat -- A

very handy indeed.

I was surprised on initial use that --stat is
limited to the file specified in "A" and doesn't
expand to describe the entire commit that touches "A".
(ie. the stat output is a subset of what is associated
with the displayed commit comments).

This, of course, is clear now, it just isn't what
I expected on first use.

thanks,
-Len

```

## Linus Torvalds, 2006-05-15 17:54

Subject: RE: how to display file history?
Message-ID: <Pine.LNX.4.64.0605151049470.3866@g5.osdl.org>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0605151049470.3866%40g5.osdl.org
In-Reply-To: <CFF307C98FEABE47A452B27C06B85BB670FB0A@hdsmsx411.amr.corp.intel.com>

```


On Mon, 15 May 2006, Brown, Len wrote:
>
> >	git log --stat -- A
> 
> very handy indeed.
> 
> I was surprised on initial use that --stat is
> limited to the file specified in "A" and doesn't
> expand to describe the entire commit that touches "A".
> (ie. the stat output is a subset of what is associated
> with the displayed commit comments).
> 
> This, of course, is clear now, it just isn't what
> I expected on first use.

Well,  you can obviously have your cake and eat it too (ie "--full-diff").

I don't often end up using the "--full-diff" thing. It's almost never 
actually worth it until I find the diff that I actually start caring 
about, and the full diff just makes it harder to see the part I explicitly 
told git I was interested in.

So the default "show only diffs for the files asked for" behaviour is in 
my opinion much superior (and it used to be the only one), because the 
"show the whole thing" part ends up being something you use only once 
you've already skimmed the default case and decide to go deeper.

Of course, "gitk" ends up using the full diff by default in its diff 
window. I'm not convinced that's the right thing, but usually when I use 
gitk I'm primarily looking at the history and the commit messages to 
decide if it's a relevant one, not the diff, so I don't think it matters.

			Linus

```
