Comments
Patch
@@ -1561,7 +1561,7 @@
for f in modified:
if ctx2.flags(f) == 'l':
d = ctx2[f].data()
- if len(d) >= 1024 or '\n' in d or util.binary(d):
+ if d == '' or len(d) >= 1024 or '\n' in d or util.binary(d):
self.ui.debug('ignoring suspect symlink placeholder'
' "%s"\n' % f)
continue
@@ -41,6 +41,13 @@
a (no-eol)
$ hg --config extensions.n=$TESTTMP/nolink.py st --debug
+Empty placeholder:
+
+ $ rm b
+ $ touch b
+ $ hg --config extensions.n=$TESTTMP/nolink.py st --debug
+ ignoring suspect symlink placeholder "b"
+
Write binary data to the placeholder:
>>> open('b', 'w').write('this is a binary\0')