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 d13fce6 + f07171c commit 1ba0d25Copy full SHA for 1ba0d25
read-cache.c
@@ -451,6 +451,17 @@ int ie_modified(struct index_state *istate,
451
* then we know it is.
452
*/
453
if ((changed & DATA_CHANGED) &&
454
+#ifdef GIT_WINDOWS_NATIVE
455
+ /*
456
+ * Work around Git for Windows v2.27.0 fixing a bug where symlinks'
457
+ * target path lengths were not read at all, and instead recorded
458
+ * as 4096: now, all symlinks would appear as modified.
459
+ *
460
+ * So let's just special-case symlinks with a target path length
461
+ * (i.e. `sd_size`) of 4096 and force them to be re-checked.
462
+ */
463
+ (!S_ISLNK(st->st_mode) || ce->ce_stat_data.sd_size != MAX_LONG_PATH) &&
464
+#endif
465
(S_ISGITLINK(ce->ce_mode) || ce->ce_stat_data.sd_size != 0))
466
return changed;
467
0 commit comments