Cygwin doesn't have uid, gid and ino stats fields.  Therefore we should
never check them in the match_stat_data when working on the CYGWIN
platform.

Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com>
---

This patch was not tested on Cygwin yet.  I think it's needed though,
because the re-reading of the index if it changed will no longer use
it's own index_changed function, but use the stat_validity_check
function instead.  Would be great if someone running Cygwin could test
this.

 read-cache.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/read-cache.c b/read-cache.c
index 1f827de..aa17ce7 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -82,6 +82,7 @@ int match_stat_data(const struct stat_data *sd, struct stat 
*st)
                changed |= CTIME_CHANGED;
 #endif
 
+#if !defined (__CYGWIN__)
        if (check_stat) {
                if (sd->sd_uid != (unsigned int) st->st_uid ||
                        sd->sd_gid != (unsigned int) st->st_gid)
@@ -89,6 +90,7 @@ int match_stat_data(const struct stat_data *sd, struct stat 
*st)
                if (sd->sd_ino != (unsigned int) st->st_ino)
                        changed |= INODE_CHANGED;
        }
+#endif
 
 #ifdef USE_STDEV
        /*
-- 
1.8.3.4.1231.g9fbf354.dirty

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to