Re: osx autocrlf sanity?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 09, 2020 at 07:31:23PM -0400, Martin Langhoff wrote:
> Hi Brian,
>
> good question! There is a .gitattributes file, all the files affected
> have these attributes
>
> *.py     text diff=python

That is the important information, that we need.
Since there is a .gitattributes file, (wich is good),
you can forget about core.autocrlf (at least for all python files).
(That should be clear from the documentation of Git,
 but it could be, that we can make things more clear).

There is only one way out of this dilemma:
renormalize the line endings in the repo (and live a happier life ;-)

https://git-scm.com/docs/git-add

Sorry to say it this short, this has nothing to do with OSX,
it is the repo itself, which needs the renormalization.

>
> regards,
>
>
> martin
>
> On Tue, Jun 9, 2020 at 7:14 PM brian m. carlson
> <sandals@xxxxxxxxxxxxxxxxxxxx> wrote:
> >
> > On 2020-06-09 at 19:52:42, Martin Langhoff wrote:
> > > Hi git list,
> > >
> > > long time no see! I am here to ask for a sanity check. I'm on OSX.
> > > Checking out a repository that has an un-controlled mix of line
> > > endings. Mostly linux-style, but some Windows CRLF endings.
> > >
> > > A few tests.
> > >  - I set core.autocrlf=input globally --> a fresh clone doesn't have a
> > > clean status files look modified right after a clone)
> > >  - set core.autocrlf=false globally --> a fresh clone doesn't have a
> > > clean status
> > >  - set core.autocrlf=true globally --> a fresh clone doesn't have a clean status
> > >
> > > This is git v2.23.0 from Homebrew.
> > >
> > > Am I doing something wrong? Can git work sanely on a mixed endings
> > > repo without having to fix the world first?
> > >
> > > ... I do strive to fix the world (and this small repository), as we
> > > all do, but it should not be a preconditions before git behaves
> > > sanely.
> >
> > Does this repository have a .gitattributes file and if so, is there any
> > correlation between the patterns in that file and the modified files?
> > --
> > brian m. carlson: Houston, Texas, US
> > OpenPGP: https://keybase.io/bk2204
>
>
>
> --
>  martin.langhoff@xxxxxxxxx
>  - ask interesting questions  ~  http://linkedin.com/in/martinlanghoff
>  - don't be distracted        ~  http://github.com/martin-langhoff
>    by shiny stuff




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux