|Re: [jgit-dev] Understanding Racy Git Handling in JGit: detection of coarse timers|
Ferry Huberts <ferry.huberts@xxxxxxxxxx> wrote: > > > In msysgit they only store the seconds portion of the timestamp > > they get back from Windows. The sub-seconds portion (if it exists > > at all) is flat out discarded. So the time_ns field in the index > > record is always 0. > > just for my curiosity... > is there a good reason _not_ to patch msysgit to fix this? > would dso accept such a patch? I have no idea. We could try. The rounding-to-seconds code dates back to the original commit that introduced it, but doesn't explain why they do the rounding: commit 5411bdc4e4b170a57a61b2d486ab344896c41500 Author: Marius Storm-Olsen <mstormo_git@xxxxxxxxxxxxxxx> Date: Mon Sep 3 20:40:26 2007 +0200 Windows: Add a new lstat and fstat implementation based on Win32 API. This gives us a significant speedup when adding, committing and stat'ing fil Also, since Windows doesn't really handle symlinks, we let stat just uses ls We also need to replace fstat, since our implementation and the standard sta functions report slightly different timestamps, possibly due to timezones. We simply report UTC in our implementation, and do our FILETIME to time_t conversion based on the document at http://support.microsoft.com/kb/167296. -- Shawn.
Back to the top