From 9f7ef0eaf2e54609128add5e8f9b506bdbb81dff Mon Sep 17 00:00:00 2001 From: Pete Wyckoff Date: Sat, 5 Nov 2011 13:36:07 -0400 Subject: git-p4: ignore apple filetype Revert 97a21ca (git-p4: stop ignoring apple filetype, 2011-10-16) and add a test case. Reported-by: Michael Wookey Signed-off-by: Pete Wyckoff Signed-off-by: Junio C Hamano --- contrib/fast-import/git-p4 | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'contrib/fast-import') diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4 index 6b91595ff..da1db4a8c 100755 --- a/contrib/fast-import/git-p4 +++ b/contrib/fast-import/git-p4 @@ -1272,6 +1272,19 @@ class P4Sync(Command, P4UserMap): text = p4_read_pipe('print -q -o - "%s"' % file['depotFile']) contents = [ text ] + if type_base == "apple": + # Apple filetype files will be streamed as a concatenation of + # its appledouble header and the contents. This is useless + # on both macs and non-macs. If using "print -q -o xx", it + # will create "xx" with the data, and "%xx" with the header. + # This is also not very useful. + # + # Ideally, someday, this script can learn how to generate + # appledouble files directly and import those to git, but + # non-mac machines can never find a use for apple filetype. + print "\nIgnoring apple filetype file %s" % file['depotFile'] + return + # Perhaps windows wants unicode, utf16 newlines translated too; # but this is not doing it. if self.isWindows and type_base == "text": -- cgit v1.2.1