git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git-p4, msysgit, and crlf

From
JXJing Xue <jingxue@digizenstudio.com>
Date
Apr 10, 2008, 21:53 UTC
Message-ID
<20080410175338.1z2hb82xw4kk4k0o@intranet.digizenstudio.com>

I'm working on a client project, where everything is developed in Windows, and perforce is the official SCM. All the files use crlf line endings.

I'm trying to use msysgit for my personal SCM, and git-p4 to sync with perforce.

The problem I'm running into is that after
   git p4 clone /perforce/path@all proj

all the files in the working directory are converted to lf line endings, which I'd like to avoid.

I tracked it down to at some point git-p4 executes what essentially amounts to

   p4 -G print /path/to/file#rev

in order to get the content of a revision. When I try to run that manually from the msysgit bash, the file content returned has all the line endings converted to lf.

However, if I try to run without "-G", i.e.
   p4 print /path/to/file#rev
The content returned has all the original crlf endings left intact.

I know this looks like a p4 issue, but I just wanted to ask other git-p4 users out there whether you have run into this, and how you dealt with it.

Thanks.
-- 
Jing Xue
Next: Tor Arvid Lund
Message 1 of 3 in “git-p4, msysgit, and crlf”
  1. Jing XueApr 10, 2008
  2. Tor Arvid LundApr 11, 2008
  3. Jing XueApr 11, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.