git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: longphant <longphant@yahoo.com>
Cc: git@vger.kernel.org
Subject: Re: How git detects changes during commit?
Date: Wed, 27 Oct 2010 15:54:41 -0500	[thread overview]
Message-ID: <20101027205441.GA8242@burratino> (raw)
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

  reply	other threads:[~2010-10-27 20:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-27 20:36 How git detects changes during commit? longphant
2010-10-27 20:54 ` Jonathan Nieder [this message]
2010-10-28 17:23   ` longphant

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101027205441.GA8242@burratino \
    --to=jrnieder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=longphant@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).