Re: Automatic core.autocrlf?
- From
- Robert Dailey <rcdailey.lists@gmail.com>
- Date
- Aug 27, 2018, 17:29 UTC
- Message-ID
- <CAHd499AFUtW3=JNrmevdHRLgfK+QSdpkkSj0wsbRkhE8tqu-rA@mail.gmail.com>
- In-Reply-To
- <CACsJy8Bik2Hokgv46ifsFhhvGzdcB=FoWnWs6_k2361s15wOPA@mail.gmail.com>
On Mon, Aug 27, 2018 at 10:53 AM Duy Nguyen <pclouds@gmail.com> wrote:
Show 12 quoted lines
> > On Mon, Aug 27, 2018 at 5:37 PM Torsten Bögershausen <tboegi@web.de> wrote: > > > In those cases, when it falls back to > > > configuration for line ending management, I want it to be > > > automatically configured based on the host platform. > > > > There is > > git config core.eol native > > An alternative is supporting conditional config includes based on > platform or host name, but I don't know if there are more use cases > like this to justify it.
To Torsten's comment: Yes, I've looked at git-config. it doesn't have the answer to my question there, hence I posted on the mailing list. To your point, eol being native doesn't matter if text=auto can't be simulated. If there was a version of `autocrlf` that set `eol=native` and `text=auto`, that would work as well. But the `true` setting sets `text=auto` and `eol=crlf`.
Duy: There are more use cases I've run into, but they are not related to the OP:
* Different user email between machines (work vs personal) * Different tooling on platform (e.g. `nano` on Ubuntu, Notepad++ on Windows)
Centralizing .gitconfig, especially when you have tons of aliases, becomes more important. 95% of my .gitconfig is platform-agnostic, if there was an `#ifdef` mechanism, per your suggestion, this would allow a lot more flexibility. Maybe I should have worded my OP more in terms of platform-specific configuration sections, instead of specifically about autocrlf, since that's just one symptom of the real problem.