diff options
Diffstat (limited to 'git-p4.py')
-rwxr-xr-x | git-p4.py | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -1977,8 +1977,11 @@ class P4Submit(Command, P4UserMap): newdiff += "+%s\n" % os.readlink(newFile) else: f = open(newFile, "r") - for line in f.readlines(): - newdiff += "+" + line + try: + for line in f.readlines(): + newdiff += "+" + line + except UnicodeDecodeError: + pass # Found non-text data and skip, since diff description should only include text f.close() return (diff + newdiff).replace('\r\n', '\n') |