From: Junio C Hamano Date: Thu, 19 Jan 2006 01:18:50 GMT Subject: Re: [PATCH] "sleep 1" sleeps too little on cygwin Message-ID: <7vmzhtqakl.fsf@assigned-by-dhcp.cox.net> In-Reply-To: <20060118185229.GA3001@steel.home> Alex Riesen writes: > this is probable unsafe too: not all systems export inodes > (the recent cygwin breakage comes to mind). Hmph. I thought that breakage was about struct dirent, not what we read from struct stat; d_ino is XSI extension so that may have been the reason cygwin folks removed it, but st_ino is in BASE --- did they remove that as well? But you are right. Among "struct stat" members, only S_IFMT part from st_mode and st_size are meaningful for symlinks after lstat() and other members are unspecified. Which means that, in the strictest sense, the original test that tried to see if the timestamp change makes the entry for the symlink cache-dirty, was pointless. HOWEVER. We live in the real world, not in a strict POSIX world. We (the index file) relies on lstat() to update st_mtime and/or st_ino, and I think it is OK (IOW, we declare that platforms on which we cannot rely on these members are not worth supporting). By the way, if you have an access to git on cygwin with FAT, could you test your patch ($SECONDS) and then i-num patch (the machine with cygwin I can borrow has only NTFS) please?