diff options
author | Johannes Sixt <j6t@kdbg.org> | 2009-04-20 10:17:00 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-04-20 12:14:02 -0700 |
commit | 34779c535c4e121414197ab08b4b502a22a75433 (patch) | |
tree | d856d59cbc54cbb7a79c5d22abc0d31bf93acd0c /t/t4128-apply-root.sh | |
parent | 6ac6f87818edfd33fea8ce3c95b47fe00a4e4b91 (diff) | |
download | git-34779c535c4e121414197ab08b4b502a22a75433.tar.gz git-34779c535c4e121414197ab08b4b502a22a75433.tar.xz |
Windows: Skip fstat/lstat optimization in write_entry()
Commit e4c72923 (write_entry(): use fstat() instead of lstat() when file
is open, 2009-02-09) introduced an optimization of write_entry().
Unfortunately, we cannot take advantage of this optimization on Windows
because there is no guarantee that the time stamps are updated before the
file is closed:
"The only guarantee about a file timestamp is that the file time is
correctly reflected when the handle that makes the change is closed."
(http://msdn.microsoft.com/en-us/library/ms724290(VS.85).aspx)
The failure of this optimization on Windows can be observed most easily by
running a 'git checkout' that has to update several large files. In this
case, 'git checkout' will report modified files, but infact only the
timestamps were incorrectly recorded in the index, as can be verified by a
subsequent 'git diff', which shows no change.
Dmitry Potapov reports the same fix needs on Cygwin; this commit contains
his updates for that.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4128-apply-root.sh')
0 files changed, 0 insertions, 0 deletions