From: Han-Wen Nienhuys Date: Wed, 23 May 2007 21:49:35 +0000 (-0300) Subject: look for 'text' and 'binary' files. X-Git-Tag: v1.5.3-rc0~65^2^2~22 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=7530a40ce2006082580865f4db6d32b956ca8dc0;p=git.git look for 'text' and 'binary' files. Signed-off-by: Han-Wen Nienhuys --- diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4 index 294c2ecfc..e955ad4f4 100755 --- a/contrib/fast-import/git-p4 +++ b/contrib/fast-import/git-p4 @@ -697,7 +697,8 @@ class P4Sync(Command): stat = filedata[j] j += 1 text = '' - while j < len(filedata) and filedata[j]['code'] == 'text': + while j < len(filedata) and filedata[j]['code'] in ('text', + 'binary'): text += filedata[j]['data'] j += 1 @@ -773,7 +774,7 @@ class P4Sync(Command): if self.isWindows and file["type"].endswith("text"): data = data.replace("\r\n", "\n") - self.gitStream.write("M %s inline %s\n" % (mode, relPath)) + self.gitStream.write("M %d inline %s\n" % (mode, relPath)) self.gitStream.write("data %s\n" % len(data)) self.gitStream.write(data) self.gitStream.write("\n")