From: Nguyen Thai Ngoc Duy Date: Fri, 10 Feb 2012 12:33:41 GMT Subject: Re: git status: small difference between stating whole repository and small subdirectory Message-ID: In-Reply-To: On Fri, Feb 10, 2012 at 4:42 PM, Piotr Krukowiecki wrote: > Hi, > > I compared stating whole tree vs one small subdirectory, and I > expected that for the subdirectory status will be very very fast. > After all, it has only few files to stat. But it's not fast. Why? Because stat'ing is not the only thing git-status does? In order to find out staged changes, unstaged changes and untracked files, it has to do the equivalence of "git diff --cached", "git diff" and "git ls-files -o". I think copy detection is also enabled, which uses more cycles. Profiling it should give you a good idea what parts cost most. -- Duy