summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorLibravatar Han-Wen Nienhuys <hanwen@google.com>2007-05-23 18:49:35 -0300
committerLibravatar Han-Wen Nienhuys <hanwen@google.com>2007-06-05 20:29:59 -0300
commit7530a40ce2006082580865f4db6d32b956ca8dc0 (patch)
tree68b95b919b4e6686dbf348e228ccf9c39c4190bb /contrib
parentthinko: really ignore deleted files. (diff)
downloadtgif-7530a40ce2006082580865f4db6d32b956ca8dc0.tar.xz
look for 'text' and 'binary' files.
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/fast-import/git-p45
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index 294c2ecfca..e955ad4f44 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")