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

Re: git-p4, msysgit, and crlf

From
JXJing Xue <jingxue@digizenstudio.com>
Date
Apr 11, 2008, 14:34 UTC
Message-ID
<20080411103417.xbu855kqasgw80gc@intranet.digizenstudio.com>
In-Reply-To
<1a6be5fa0804110412v5e11e761xfdf4d4c7d8545661@mail.gmail.com>
Quoting Tor Arvid Lund <torarvid@gmail.com>:
> Well, I'm no expert, but I'll try:
Thanks. :-)
> I think if you have the core.autocrlf config option set to true, it
> should automatically convert line endings to CRLF for you when
> checking out files to your working dir, and converting it back to LF
> when committing. [snipped]

I did try exactly that - actually I tried explicitly setting it either way, and neither worked. At any rate, the files in my case _have_ CRLF in perforce, and what I want to achieve is really just to have everybody leave them alone, i.e., no conversions whatsoever. :-)

 From my code reading, core.autocrlf doesn't seem to be referenced  
anywhere in git-p4 anyways. In fact, besides the p4 -G issue I  
described in my first post, git-p4 itself also seems to always convert  
"\r\n" to "\n" on any Windows text files (in method P4Sync.commit()),  
prior to send them to git-fast-import.

And git-fast-import doesn't really do any conversion. The commit data it receives is always treated as binary (which is good). So it seems to me that the core git is off the hook here.

Cheers.
-- 
Jing Xue
Previous: Tor Arvid Lund
Message 3 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.