You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Uday Gire <ud...@managecat.com> on 2015/07/19 18:10:37 UTC

CRLF File Endings Problem in Git

Hello 

I have just checked out the TomEE Source code from https://github.com/apache/tomee <https://github.com/apache/tomee> but when I command >>git diff from command line it gives the bunch of message like 

warning: CRLF will be replaced by LF in container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/cipher/PlainTextPasswordCipher.java.

How could I suppress these warning messages? Do you have any suggestion?

I am using Mac OS X. 

Best

Uday Gire
ManageCat, http://www.managecat.com <http://www.managecat.com/>
uday.gire@managecat.com




Re: CRLF File Endings Problem in Git

Posted by Jonathan Gallimore <jg...@tomitribe.com>.
Hey Andy

I ran into this one recently, and it still seems to cause me some issues on
the 1.7.x branch, where a whole ton of files show as changed immediately
after checkout. Should this work on Linux/Mac platforms without issue now?

Thanks

Jon

On Tue, Jul 21, 2015 at 6:44 PM, agumbrecht <ag...@tomitribe.com>
wrote:

> Hi Uday,
>
> To be able to use GIT on Win platforms with any success you need to make
> sure every repository you use has a '.gitattributes' file that contains at
> least the line '* text=auto' - TomEE repositories have this now, but there
> may have been a period where this is not the case - it looks like you may
> have cloned a TomEE repository that did not have this file. Please follow
> the steps below to fix your local repository. Open a console and cd into
> the
> local repository directory:
>
> Steps to Fix Line Endings
> ------------------------
>
> git rm --cached -r .
> git -f reset --hard
> git add .
> git commit -m "Normalize line endings"
>
> Hope this helps,
>
> Andy.
>
>
>
> -----
>     --
>     Andy Gumbrecht
>
>     http://www.tomitribe.com
>     agumbrecht@tomitribe.com
>     https://twitter.com/AndyGeeDe
>
>     TomEE treibt Tomitribe ! | http://tomee.apache.org
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/CRLF-File-Endings-Problem-in-Git-tp4675533p4675559.html
> Sent from the TomEE Dev mailing list archive at Nabble.com.
>



-- 
Jonathan Gallimore
http://twitter.com/jongallimore
http://www.tomitribe.com

Re: CRLF File Endings Problem in Git

Posted by agumbrecht <ag...@tomitribe.com>.
Hi Uday,

To be able to use GIT on Win platforms with any success you need to make
sure every repository you use has a '.gitattributes' file that contains at
least the line '* text=auto' - TomEE repositories have this now, but there
may have been a period where this is not the case - it looks like you may
have cloned a TomEE repository that did not have this file. Please follow
the steps below to fix your local repository. Open a console and cd into the
local repository directory:

Steps to Fix Line Endings
------------------------

git rm --cached -r .
git -f reset --hard
git add .
git commit -m "Normalize line endings"

Hope this helps,

Andy.



-----
    -- 
    Andy Gumbrecht

    http://www.tomitribe.com
    agumbrecht@tomitribe.com
    https://twitter.com/AndyGeeDe

    TomEE treibt Tomitribe ! | http://tomee.apache.org
--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/CRLF-File-Endings-Problem-in-Git-tp4675533p4675559.html
Sent from the TomEE Dev mailing list archive at Nabble.com.

Re: CRLF File Endings Problem in Git

Posted by Romain Manni-Bucau <rm...@gmail.com>.
got a lot of issues recently (on linux and Mac), didnt investigate cause of
the lack of time but if there is a way to avoid to have a diff on all files
when actual diff is a single line  happy to help


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>

2015-07-19 14:37 GMT-07:00 Jorge Esteban Quilcate Otoya <
quilcate.jorge@gmail.com>:

> Hi Uday,
>
> I think this is harmless, but here is an article from GitHub about how to
> handle this: https://help.github.com/articles/dealing-with-line-endings/
>
> Hope this helps,
> Jorge.
>
> El dom., 19 jul. 2015 a las 18:11, Uday Gire (<ud...@managecat.com>)
> escribió:
>
> > Hello
> >
> > I have just checked out the TomEE Source code from
> > https://github.com/apache/tomee <https://github.com/apache/tomee> but
> > when I command >>git diff from command line it gives the bunch of message
> > like
> >
> > warning: CRLF will be replaced by LF in
> >
> container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/cipher/PlainTextPasswordCipher.java.
> >
> > How could I suppress these warning messages? Do you have any suggestion?
> >
> > I am using Mac OS X.
> >
> > Best
> >
> > Uday Gire
> > ManageCat, http://www.managecat.com <http://www.managecat.com/>
> > uday.gire@managecat.com
> >
> >
> >
> >
>

Re: CRLF File Endings Problem in Git

Posted by Jorge Esteban Quilcate Otoya <qu...@gmail.com>.
Hi Uday,

I think this is harmless, but here is an article from GitHub about how to
handle this: https://help.github.com/articles/dealing-with-line-endings/

Hope this helps,
Jorge.

El dom., 19 jul. 2015 a las 18:11, Uday Gire (<ud...@managecat.com>)
escribió:

> Hello
>
> I have just checked out the TomEE Source code from
> https://github.com/apache/tomee <https://github.com/apache/tomee> but
> when I command >>git diff from command line it gives the bunch of message
> like
>
> warning: CRLF will be replaced by LF in
> container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/cipher/PlainTextPasswordCipher.java.
>
> How could I suppress these warning messages? Do you have any suggestion?
>
> I am using Mac OS X.
>
> Best
>
> Uday Gire
> ManageCat, http://www.managecat.com <http://www.managecat.com/>
> uday.gire@managecat.com
>
>
>
>