checkout: do not test file mode on Windows On Windows, we do not support file mode changes, so do not test for type changes between the disk and tree being checked out. We could have false positives since the on-disk file can only have an (effective) mode of 0100644 since NTFS does not support executable files. If the tree being checked out did have an executable file, we would erroneously decide that the file on disk had been changed.
diff --git a/src/checkout.c b/src/checkout.c
index 6375917..105d6e3 100644
--- a/src/checkout.c
+++ b/src/checkout.c
@@ -161,7 +161,15 @@ GIT_INLINE(bool) is_workdir_base_or_new(
GIT_INLINE(bool) is_file_mode_changed(git_filemode_t a, git_filemode_t b)
{
+#ifdef GIT_WIN32
+ /*
+ * On Win32 we do not support the executable bit; the file will
+ * always be 0100644 on disk, don't bother doing a test.
+ */
+ return false;
+#else
return (S_ISREG(a) && S_ISREG(b) && a != b);
+#endif
}
static bool checkout_is_workdir_modified(