* convert crlf to eol on vendor branch overlay
@ 2011-04-08 2:40 Neal Kreitzinger
2011-04-08 4:43 ` Junio C Hamano
0 siblings, 1 reply; 3+ messages in thread
From: Neal Kreitzinger @ 2011-04-08 2:40 UTC (permalink / raw)
To: git
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: convert crlf to eol on vendor branch overlay
2011-04-08 2:40 convert crlf to eol on vendor branch overlay Neal Kreitzinger
@ 2011-04-08 4:43 ` Junio C Hamano
2011-04-08 18:18 ` Neal Kreitzinger
0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2011-04-08 4:43 UTC (permalink / raw)
To: Neal Kreitzinger; +Cc: git
"Neal Kreitzinger" <neal@rsss.com> writes:
> 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)
Instead, how about something like:
$ git ls-files -z | xargs -0 perl -p -i -e 's/\r$//'
and then:
> $ git add . -A
> $ git commit -m'convert eol' (should convert CRLF to LF)
?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: convert crlf to eol on vendor branch overlay
2011-04-08 4:43 ` Junio C Hamano
@ 2011-04-08 18:18 ` Neal Kreitzinger
0 siblings, 0 replies; 3+ messages in thread
From: Neal Kreitzinger @ 2011-04-08 18:18 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Neal Kreitzinger, git
On 4/7/2011 11:43 PM, Junio C Hamano wrote:
> "Neal Kreitzinger"<neal@rsss.com> writes:
>
>> 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)
>
> Instead, how about something like:
>
> $ git ls-files -z | xargs -0 perl -p -i -e 's/\r$//'
>
> and then:
>
>> $ git add . -A
>> $ git commit -m'convert eol' (should convert CRLF to LF)
>
> ?
That worked! Thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-04-08 18:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-08 2:40 convert crlf to eol on vendor branch overlay Neal Kreitzinger
2011-04-08 4:43 ` Junio C Hamano
2011-04-08 18:18 ` Neal Kreitzinger
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.