We have an issue with our Windows Horde Agents and the UE5 source files when synced from perforce. The issue is that the line endings will be converted from [cr][lf] (this is what the UE5 source files are committed with) to [cr][cr][lf] on the agent. The reason for this is that the agent will create a P4 workspace with line endings set to local which causes the sync to convert [lf] endings to [cr][lf] (it ignores the fact there is a [cr] there already).
If you manually update the workspace to have a different line ending type this will get changed back to local when the agent performs another sync. Unfortunately there appears to be no way to set the preferred line ending type in the Horde Agent config files.
We have made a modification to allow line ending types to be specified (and the enumerations and data fields exist in the UE Engine source code) but are curious as to if there is a proper way to solve this issue without doing code modifications?
Thanks
Steps to Reproduce
Download UE5 source and add it to Perforce, on our Perforce server the windows line endings of the UE5 source will be preserved.
Setup a windows horde agent and have it create a workspace and sync files.
The files synced to the windows agent should all have line endings as [cr][cr][lf].
Check that the source files checked in to Perforce are in-fact marked as <text> type, and not something else. (Note: There are _some_ such files that should be utf-16 or mac, but text is the most common file type.)
P4 actually stores all text files with unix line-endings, and does line conversion during sync/submit to “make it work” for the local system. I have experienced this before where it somehow ended up stored with _any_ \r characters, which then confused the converter at sync, which is made even worse by a subsequent submit.
Hey there,
Just to echo Yang’s sentiment h ere - we have our source as text, and don’t encounter such issues within our Horde Agent context.
Julian
Thanks for the replies 
Ah looking at perforce it appears that perforce will only do line ending conversions on submission if the workspace is set as shared. It looks like we have submitted our source (which was pulled down onto a windows machine with local setting) with Unix line endings hence no conversion and the resulting issues with the Horde Agent using the local line ending style 