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

Using format-patch and apply against files with CRLF line endings

From
Steven E. Harris <seh@panix.com>
Date
Apr 20, 2011, 11:48 UTC
Message-ID
<m2tydt5ekt.fsf@Spindle.sehlabs.com>

Is it the case that format-patch will always emit text with LF line endings, or is it respecting whatever the host platform considers to be the proper line ending? Is the line ending in use configurable?

I ask because I see that git-p4 uses format-patch and apply internally to apply changes against files in the Perforce workspace, and those files have CRLF line endings, but it looks like format-patch is emitting patches with LF line endings, and none of those patches will apply cleanly.

Perhaps I just need to pipe the output from format-patch through unix2dos before feeding it to apply, but I'm wondering whether I'm barking up the wrong tree here.

-- 
Steven E. Harris
Next: Jay Soffian
Message 1 of 2 in “Using format-patch and apply against files with CRLF line endings”
  1. Steven E. HarrisApr 20, 2011
  2. Jay SoffianApr 20, 2011

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.