We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e109b35 + c1b11b6 commit 9dbfb80Copy full SHA for 9dbfb80
read-cache.c
@@ -453,6 +453,17 @@ int ie_modified(struct index_state *istate,
453
* then we know it is.
454
*/
455
if ((changed & DATA_CHANGED) &&
456
+#ifdef GIT_WINDOWS_NATIVE
457
+ /*
458
+ * Work around Git for Windows v2.27.0 fixing a bug where symlinks'
459
+ * target path lengths were not read at all, and instead recorded
460
+ * as 4096: now, all symlinks would appear as modified.
461
+ *
462
+ * So let's just special-case symlinks with a target path length
463
+ * (i.e. `sd_size`) of 4096 and force them to be re-checked.
464
+ */
465
+ (!S_ISLNK(st->st_mode) || ce->ce_stat_data.sd_size != MAX_LONG_PATH) &&
466
+#endif
467
(S_ISGITLINK(ce->ce_mode) || ce->ce_stat_data.sd_size != 0))
468
return changed;
469
0 commit comments