On Mon, 19 Apr 2021 at 12:10, Bagas Sanjaya <bagasdotme@xxxxxxxxx> wrote: > > On 19/04/21 16.11, Cristian Morales Vega wrote: > > 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. > > _Maybe_ it could make sense for "git checkout" to always behave as if > > "git update-index --refresh" had been run before? No idea really. > I know that setting SELinux label can alter file ctime, but when > I need to write the test that simulate file ctime update, do you > know which Unix command can trigger that, beside SELinux tools? I am no expert on SELinux and I'm not sure I understand the question. I know "chcon", from coreutils, can do the SELinux labeling/ctime update. You could use that when writing a test. There is an example on the fifth comment of JENKINS-65395. I know "docker run --volume <host-dir>:<container-dir>:rw,z" will do the same, at least if SELinux is enabled. Which is what triggers JENKINS-65395. Don't really know a lot more.