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

convert crlf to eol on vendor branch overlay

From
NKNeal Kreitzinger <neal@rsss.com>
Date
Apr 8, 2011, 02:40 UTC
Message-ID
<inlsit$scv$1@dough.gmane.org>

My vendor gave me a tarball with all CRLF eol's. I'm using the vendor-branch overlay method (git ls-files -z | xargs -0 rm -f && tar -xvzf tarfile.tar.gz). How do I convert the eol's to LF?

I tried this:

vi .git/attributes SRC/*/* text (convert these to LF eol on commit)

$ git config core.eol lf (convert "text" attr files to LF eol on checkout)

$ git add . -A $ git commit -m'convert eol' (should convert CRLF to LF) $ git checkout otherbranch (change worktree) $ git checkout vendorbranch (checkout worktree from commit to get LF version) $ git reset HEAD^ (remove commit but keep worktree LF version) $ git diff (still CRLF) $ git status (still show everything as modified due to CRLF)

v/r, neal

Next: Junio C Hamano
Message 1 of 3 in “convert crlf to eol on vendor branch overlay”
  1. Neal KreitzingerApr 8, 2011
  2. Junio C HamanoApr 8, 2011
  3. Neal KreitzingerApr 8, 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.