Let util.binary check entire data for \0 (issue1066, issue1079)
authorChristian Ebert <blacktrash@gmx.net>
Tue, 08 Apr 2008 13:19:36 +0200
changeset 6507 9699864de219
parent 6506 850071c017fa
child 6508 4b2c266bf059
Let util.binary check entire data for \0 (issue1066, issue1079)
mercurial/util.py
--- a/mercurial/util.py	Wed Apr 09 14:12:32 2008 +0200
+++ b/mercurial/util.py	Tue Apr 08 13:19:36 2008 +0200
@@ -243,8 +243,8 @@
     return pipefilter(s, cmd)
 
 def binary(s):
-    """return true if a string is binary data using diff's heuristic"""
-    if s and '\0' in s[:4096]:
+    """return true if a string is binary data"""
+    if s and '\0' in s:
         return True
     return False