From: Junio C Hamano Date: Fri, 17 Feb 2012 22:25:25 GMT Subject: Re: git status: small difference between stating whole repository and small subdirectory Message-ID: <7vaa4hrtbe.fsf@alter.siamese.dyndns.org> In-Reply-To: <20120217203755.GA30114@sigill.intra.peff.net> Jeff King writes: > That being said, we do have an index extension to store the tree sha1 of > whole directories (i.e., we populate it when we write a whole tree or > subtree into the index from the object db, and it becomes invalidated > when a file becomes modified). This optimization is used by things like > "git commit" to avoid having to recreate the same sub-trees over and > over when creating tree objects from the index. But we could also use it > here to avoid having to even read the sub-tree objects from the object > db. Like b65982b (Optimize "diff-index --cached" using cache-tree, 2009-05-20) perhaps?