Hi Kirill,
On Wed, 4 Nov 2015, Kirill Katsnelson wrote:
> When GfW is installed, the new Windows-only super config has the option
> "core.crlf=auto" added (assuming the user selects the corresponding
> preference, which is a wise thing to do in Windows). Unfortunately,
> VS2015 Git provider does not know about the super config, and therefore
> thinks all files have changed when opening a solution from the cloned
> repository
You probably meant core.autocrlf, not core.crlf.
And yes, libgit2 does not (yet) heed the config in ProgramData. I have no
time line for you on that front, unfortunately.
> To confirm, I selected Team Explorer/Settings/Repository settings/Other
> inside VS2015, and indeed "core.crlf" is not one of the settings listed
> there, nor any other from it (e. g., I see help.format, rebase.autosquash
> and others in the super config but not in VS dump)
>
> The only sensible workaround now is to copy the super config settings
> manually into the system or global config, but that kinda defeats the
> purpose of the whole thing.
No, copying is the wrong thing to do. The whole, entire idea of moving the
config into a location that is *outside* of Git for Windows' directory
tree is to have a *proper* OS-wide config. It was a cute trick of libgit2
(and JGit, and other Git tools) to try to reuse Git for Windows' own
config, but it was also not quite the proper thing to do, as seen by the
config's move from C:\Program Files (x86)\etc\gitconfig to C:\Program
Files\Git\mingw64\etc\gitconfig. The location of the config is an
*implementation detail* that other tools just should never have relied
upon.
> I do not know if there is a sensible solution except propagating the super
> config feature up to the main stream development and let the VS Git
> provider and other libgit2 clients pick up the change. Currently, it is
> half-baked, unusable and causes more confusion than solves problems.
Thanks for your judgement. :-P
Seriously again, if you want to help, by all means, it is Open Source and
you are welcome to contribute. Venting your frustration is, however,
likely to be counterproductive: guess how much fun it is for others to
work on something where you get only frustration and anger as reward?
So yeah, I guess I am a bit more unlikely now to pick this up, in favor of
more rewarding tickets.
> To me, it would make more sense to create an ntfs link from
> .../etc/gitconfig to %ProgramData%/git/config to pioneer a good setup
> practice. It is easy to symlink in cygwin and thus share the same
> config, if the user wants 2 different Gits installed, or migrates.
Oh my. Symlinks. I fear that you may lack the entire background on this
can of worms:
https://github.com/git-for-windows/git/wiki/Symbolic-Links
Please note that there is no such thing as an "ntfs link". There are
reparse points, of which there are two relevant sub types: Vista-style
symlinks and pre-Vista junction points.
And of course there are .lnk files (which Cygwin used before to emulate
symlinks).
All of these (which all are referred to as "symbolic links") come with
their own set of challenges.
Ciao,
Johannes