##// END OF EJS Templates
windows: sanity-check symlink placeholders...
Matt Mackall -
r15348:c681e478 stable
parent child Browse files
Show More
@@ -1354,6 +1354,22 b' class localrepository(repo.repository):'
1354 1354 added.append(fn)
1355 1355 removed = mf1.keys()
1356 1356
1357 if working and modified and not self.dirstate._checklink:
1358 # Symlink placeholders may get non-symlink-like contents
1359 # via user error or dereferencing by NFS or Samba servers,
1360 # so we filter out any placeholders that don't look like a
1361 # symlink
1362 sane = []
1363 for f in modified:
1364 if ctx2.flags(f) == 'l':
1365 d = ctx2[f].data()
1366 if len(d) >= 1024 or '\n' in d or util.binary(d):
1367 self.ui.debug('ignoring suspect symlink placeholder'
1368 ' "%s"\n' % f)
1369 continue
1370 sane.append(f)
1371 modified = sane
1372
1357 1373 r = modified, added, removed, deleted, unknown, ignored, clean
1358 1374
1359 1375 if listsubrepos:
General Comments 0
You need to be logged in to leave comments. Login now