From: Junio C Hamano Date: Tue, 17 Feb 2009 00:28:10 GMT Subject: Re: git commit scanning entire working tree? Message-ID: <7vwsbpewkl.fsf@gitster.siamese.dyndns.org> In-Reply-To: <2729632a0902161458m732af362od59e5f35af5643c3@mail.gmail.com> skillzero@gmail.com writes: > When I do a 'git commit ', git seems to scan > the entire working tree. Since my tree is relatively large (and when > on Windows, stat'ing is even slower), it takes quite a while (5 or so > seconds) before I can even edit the commit message. Do you mean you edit the commit message, starting from the message template "git commit" gives you? The template lists "Changes to be committed" (which obviously would list only the path that matches the single pathspec you give to the command, and there is no need to scan the whole tree -- it only needs to check the file or a directory hierarchy if the pathspec matches a directory), but also "Changed but not updated" and "Untracked files". You cannot generate the latter two lists without checking with your work tree.