CTime inconsistencies (git rebase, XCode file changed etc.)

19 views
Skip to first unread message

Alex Blewitt

unread,
Feb 20, 2010, 2:31:33 PM2/20/10
to zfs-...@googlegroups.com
I've experienced a few annoying issues with XCode and Git when reading/writing files, in the sense that occasionally they'll complain about the files on disk being in an inconsistent state. 

This can be recreated fairly easily with a Git repository; for example:


apple:test alex$ git status
# On branch master
nothing to commit (working directory clean)
apple:test alex$ git rebase -i a6c37f4ea9881897650504756a61556015978b96
Working tree is dirty

It turns out that Git has a configuration option which will allow this to happen:

apple:test alex$ git config --global core.trustctime false
apple:test alex$ git rebase -i a6c37f4ea9881897650504756a61556015978b96
Successfully rebased and updated refs/heads/master.

So there's obviously something odd going on with the 'ctime' aspect. I've not been able to determine from the command line what's going on - the 'stat' command works well, and I can't see any values, but I wonder if it might be related to the stat64 or the hightime (and/or truncation of lower precision).

If someone has C experience, and is able to write a test case of creating a file and then getting its ctime to see if we can recreate the problem, then it will be possible to try and work backwards and find out what's going on in the code.

Alex

Reply all
Reply to author
Forward
0 new messages