Re: Kernel SCM saga..

Linus Torvalds
2005-04-08T17:45:30Z

On Fri, 8 Apr 2005, Chris Wedgwood wrote:
> On Fri, Apr 08, 2005 at 10:14:22AM -0700, Linus Torvalds wrote:
>
> > After applying a patch, I can do a complete "show-diff" on the kernel tree
> > to see the effect of it in about 0.15 seconds.
>
> How does that work? Can you stat the entire tree in that time? I
> measure it as being higher than that.

I can indeed stat the entire tree in that time (assuming it's in memory,
of course, but my kernel trees are _always_ in memory ;), but in order to
do so, I have to be good at finding the names to stat.

In particular, you have to be extremely careful. You need to make sure
that you don't stat anything you don't need to. We're not talking just
blindly recursing the tree here, and that's exactly the point. You have to
know what you're doing, but the whole point of keeping track of directory
contents is that dammit, that's your whole job.

Anybody who can't list the files they work on _instantly_ is doing
something damn wrong.

"git" is really trivial, written in four days. Most of that was not
actually spent coding, but thinking about the data structures.

Linus