Configure line-ending settings

To specify how line endings are handled when you sync text files, set the LineEnd: field. Valid settings are as follows:

Option Description

local

Use mode native to the client (default)

unix

UNIX-style (and Mac OS X) line endings: LF

mac

Mac pre-OS X: CR only

win

Windows- style: CR, LF

share

The share option normalizes mixed line-endings into UNIX line-end format. The share option does not affect files that are synced into a client workspace; however, when files are submitted back to the Helix Server server, the share option converts all Windows-style CR/LF line-endings and all Mac-style CR line-endings to the UNIX-style LF, leaving lone `LF`s untouched.

When you sync your client workspace, line endings are set to LF. If you edit the file on a Windows computer, and your editor inserts CR’s before each LF, the extra CR’s do not appear in the archive file.

The most common use of the share option is for users of Windows computers who mount their UNIX home directories as network drives; if you sync files from UNIX, but edit the files on a Windows computer.

The share option implicitly edits the file(s) during a submit. As a consequence, if you have set the LineEnd field to share in your client spec, the p4 resolve command may prompt you to edit the file before resolving.

For detailed information about how Helix Server uses the line-ending settings, see the Support Knowledgebase article, “CR/LF Issues and Text Line-endings”.