git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 0/3] Win32: nanosecond-precision file times

From
Karsten Blees <karsten.blees@gmail.com>
Date
Feb 12, 2015, 22:57 UTC
Message-ID
<54DD2FDA.7030604@gmail.com>
In-Reply-To
<xmqqbnkysygl.fsf@gitster.dls.corp.google.com>
Am 12.02.2015 um 20:48 schrieb Junio C Hamano:
Show 11 quoted lines
> Karsten Blees <karsten.blees@gmail.com> writes:
> 
>> However, some users have expressed concerns that 'same size and
>> mtime' [2] may theoretically happen by chance in daily operation.
> 
> Hmph.
> 
> Haven't we already accepted that it is not just "may theoretically
> happen" and had counter-measures in racy-git detection machinery
> for quite some time?
> 

Racy-git only triggers for files that are modified at the same time as .git/index (i.e. we don't know if the stat cache is up to date).

This is more about copying 'old' things around, which usually also copies mtime on Windows. E.g.:

  # create two files with slightly different mtime
  for i in {1..10}; do (echo "v1" >> test); done &&
  for i in {1..10}; do (echo "v2" >> test2); done
  # wait a bit so that '.git/index' is always newer than 'test' / 'test2'
  sleep 1
  git add test
  git commit -m v1
  # copy test2 over test (similar to 'cp -p', but native 'copy' also
  # copies mtime nanoseconds)
  cmd //c "copy /y test2 test"
  git add test
  git commit -m v2

Without these patches, git does not detect the change, and the second git add / git commit are noops.

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Previous: Johannes SchindelinNext: Junio C Hamano
Message 9 of 15 in “Win32: nanosecond-precision file times”
  1. 0/3 Win32: nanosecond-precision file timesKarsten Blees, Feb 11, 2015
  2. 1/3 Win32: make FILETIME conversion functions publicKarsten Blees, Feb 11, 2015
  3. 2/3 Win32: replace MSVCRT's fstat() with a Win32-based implementationKarsten Blees, Feb 11, 2015
  4. 3/3 Win32: implement nanosecond-precision file timesKarsten Blees, Feb 11, 2015
  5. Thomas BraunFeb 12, 2015
  6. Karsten BleesFeb 12, 2015
  7. Junio C HamanoFeb 12, 2015
  8. Johannes SchindelinFeb 12, 2015
  9. Karsten BleesFeb 12, 2015
  10. Junio C HamanoFeb 12, 2015
  11. Karsten BleesFeb 13, 2015
  12. Junio C HamanoFeb 13, 2015
  13. Karsten BleesFeb 16, 2015
  14. Junio C HamanoFeb 16, 2015
  15. Karsten BleesFeb 17, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.