Re: [PATCH 2/2] Windows: Skip fstat/lstat optimization in write_entry()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Mon, 20 Apr 2009, Johannes Sixt wrote:

> From: Johannes Sixt <j6t@xxxxxxxx>
> 
> 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.
> 
> Signed-off-by: Johannes Sixt <j6t@xxxxxxxx>
> ---
>  My gut feeling was right: We cannot have this optimization on Windows.
> 
>  http://thread.gmane.org/gmane.comp.version-control.git/108351/focus=108357
> 
>  I've a repository where I can reproduce the error quite easily and this
>  fixes it.
> 
>  -- Hannes (who forgot to add Dscho and git@vger on the first send attempt)

You want this in 4msysgit's 'devel' branch, correct?

Ciao,
Dscho "who is still interim maintainer ;-)"
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]