Re: git checkout behaviour when only ctime of file changes

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

 



Cristian Morales Vega <christian.morales.vega@xxxxxxxxx> writes:

> I thought you may want to take a look at
> https://issues.jenkins.io/browse/JENKINS-65395.
>
> Basically after something updates the ctime of a file, a
> "git checkout" can behave differently depending on whether a
> "git update-index --refresh" has been run before or not.

Changes to ctime, not just to mtime, participate in "the path may
have been changed so need to go back to the contents to see if it
truly has" logic, and "update-index --refresh" is a mechanism to
clear that "the path may have been changed" bit.  

So if your "behave differently ... with or without refresh" happens
equally if you replace 'ctime' in your statement with 'mtime', then
everything is working as designed.  But it was unclear from your
description.

Assuming that the difference with and without refresh after mtime
change is the same as the difference with and without refresh after
ctime change, the "core.trustctime" configuration variable is for
those whose files have untrustworthy ctime (due to background
scanners and other funnies).




[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]

  Powered by Linux