summaryrefslogtreecommitdiff
path: root/t/t1012-read-tree-df.sh
diff options
context:
space:
mode:
authorLibravatar Pete Wyckoff <pw@padd.com>2013-01-26 22:11:13 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-01-26 22:00:39 -0800
commit7f0e596276aa120059b0f2df235a8ba1cb9b2554 (patch)
tree7e4c011d298509831d7c1caaaf8eea8206424e81 /t/t1012-read-tree-df.sh
parentgit p4: remove unreachable windows \r\n conversion code (diff)
downloadtgif-7f0e596276aa120059b0f2df235a8ba1cb9b2554.tar.xz
git p4: scrub crlf for utf16 files on windows
Files of type utf16 are handled with "p4 print" instead of the normal "p4 -G print" interface due to how the latter does not produce correct output. See 55aa571 (git-p4: handle utf16 filetype properly, 2011-09-17) for details. On windows, though, "p4 print" can not be told which line endings to use, as there is no underlying client, and always chooses crlf, even for utf16 files. Convert the \r\n into \n when importing utf16 files. The fix for this is complex, in that the problem is a property of the NT version of p4. There are old versions of p4 that were compiled directly for cygwin that should not be subjected to text replacement. The right check here, then, is to look at the p4 version, not the OS version. Note also that on cygwin, platform.system() is "CYGWIN_NT-5.1" or similar, not "Windows". Add a function to memoize the p4 version string and use it to check for "/NT", indicating the Windows build of p4. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1012-read-tree-df.sh')
0 files changed, 0 insertions, 0 deletions