All of lore.kernel.org
 help / color / mirror / Atom feed
* How git detects changes during commit?
@ 2010-10-27 20:36 longphant
  2010-10-27 20:54 ` Jonathan Nieder
  0 siblings, 1 reply; 3+ messages in thread
From: longphant @ 2010-10-27 20:36 UTC (permalink / raw)
  To: git


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)?
-- 
View this message in context: http://git.661346.n2.nabble.com/How-git-detects-changes-during-commit-tp5680208p5680208.html
Sent from the git mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How git detects changes during commit?
  2010-10-27 20:36 How git detects changes during commit? longphant
@ 2010-10-27 20:54 ` Jonathan Nieder
  2010-10-28 17:23   ` longphant
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Nieder @ 2010-10-27 20:54 UTC (permalink / raw)
  To: longphant; +Cc: git

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How git detects changes during commit?
  2010-10-27 20:54 ` Jonathan Nieder
@ 2010-10-28 17:23   ` longphant
  0 siblings, 0 replies; 3+ messages in thread
From: longphant @ 2010-10-28 17:23 UTC (permalink / raw)
  To: git


Thanks, that is a lot of help. I am a complete noob to version control, so I
was wondering if you could give me a noobie tutorial of how it works. Does
git lstat each file that is committed and then check the time of last
modification? Or does it lstat the directory?
-- 
View this message in context: http://git.661346.n2.nabble.com/How-git-detects-changes-during-commit-tp5680208p5683536.html
Sent from the git mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-10-28 17:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-27 20:36 How git detects changes during commit? longphant
2010-10-27 20:54 ` Jonathan Nieder
2010-10-28 17:23   ` longphant

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.