From: Jonathan Nieder Date: Wed, 27 Oct 2010 20:54:41 GMT Subject: Re: How git detects changes during commit? Message-ID: <20101027205441.GA8242@burratino> In-Reply-To: <1288211811436-5680208.post@n2.nabble.com> Hi, longphant wrote: > Say you check out a directory of 100 files. You edit 5 of the files, and you > go to commit the directory back. How does git know which of the 100 files > were modified (not all of them were)? The lstat system call. See the git-update-index(1) manual for some hints (since most high-level commands do the equivalent of "git update-index --refresh -q" before working with the work tree). Hope that helps, Jonathan