You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
git config --system --edit should use new "super-config" from "C:\ProgramData\Git\config" #154
changed the title [-]"git config --system --edit" should use new "super-config" from "C:\ProgramData\Git\config"[/-][+]`git config --system --edit` should use new "super-config" from "C:\ProgramData\Git\config"[/+]on May 19, 2015
Not that it matters much, but the branch that was merged in 9c9dc30 was called dscho/super-config which is where I got the name from. Also several variable names contain the string super_config.
Try this: git config --system -l. It looks for /etc/gitconfig and does not care about C:\ProgramData\Git\config. Now, if it does not do that, why should git config --system --edit?
Reading through libgit2/libgit2#3040 again, I believe the conclusion was to store system-wide configuration in %PROGRAMDATA%/Git/configinstead of the installation-specific %PROGRAMFILES%/Git/etc/gitconfig.
So introducing a new "super-config" that cannot be addressed via CLI, and git config --system reading from / writing to the installation-specific config rather than the system-wide config is quite odd IMO.
@kblees Exactly my understanding, too. All system related config operations should access %PROGRAMDATA%\Git\config and nothing else in the new Git version.
It looks for /etc/gitconfig and does not care about C:\ProgramData\Git\config.
Reading through libgit2/libgit2#3040 again, I believe the conclusion was to store system-wide configuration in %PROGRAMDATA%/Git/config instead of the installation-specific %PROGRAMFILES%/Git/etc/gitconfig.
Actually, there are already settings that don't make no sense in that Windows-wide config: the location of the SSL certificates is relative to the location of $prefix/etc/gitconfig. So we actually use both config files.
the location of the SSL certificates is relative to the location of $prefix/etc/gitconfig.
I don't understand that. ETC_GITCONFIG is used only once in git_etc_gitconfig(), which is only used in three places, which don't do any relative path mangling.
Look at line 14 of the gitconfig we install via git-extra. This path is interpreted relative to the $prefix. It would not make sense in %PROGRAMDATA%\Git\config. But it does make sense in $prefix/etc/gitconfig.
Look at line 14 of the gitconfig we install via git-extra. This path is interpreted relative to the $prefix. It would not make sense in %PROGRAMDATA%\Git\config. But it does make sense in $prefix/etc/gitconfig.
Actually I believe a system-wide ca-certificates file makes much more sense than an installation-specific one...e.g. if you add a self-signed certificate of some company-private git server, you don't need to do it for every installation. We'd have to agree on a %PROGRAMDATA% path, of course.
However, I still don't see why the ssl-path issue should hinder us from using %PROGRAMDATA%\Git\config for the system-wide config...these are completely unrelated paths in my understanding. But perhaps I'm just too dumb to grok it.
Okay, I made up my mind. The arguments I heard so far do not convince me. If git config --system --edit were to do anything else but to open /etc/gitconfig in an editor, it would be inconsistent behavior, breaking backwards compatibility, and disagreeing with the documentation. Therefore it would be a serious regression to make it so.
Activity
[-]"git config --system --edit" should use new "super-config" from "C:\ProgramData\Git\config"[/-][+]`git config --system --edit` should use new "super-config" from "C:\ProgramData\Git\config"[/+]linquize commentedon May 19, 2015
What a good name super-config!
sschuberth commentedon May 19, 2015
Well, it was @dscho who came up with that name AFAIK.
dscho commentedon May 19, 2015
Can't take credit for that... I call it "Windows-wide config".
linquize commentedon May 19, 2015
as it is Windows-specific config file
sschuberth commentedon May 19, 2015
Not that it matters much, but the branch that was merged in 9c9dc30 was called
dscho/super-configwhich is where I got the name from. Also several variable names contain the stringsuper_config.nalla commentedon May 20, 2015
That path comes from
ETC_GITCONFIGwhich is defined here. So to me the question arises, what aboutETC_GITATTRIBUTESthat is defined one line below?Was the location of
ETC_GITATTRIBUTESalso discussed with https://github.com/libgit2?dscho commentedon May 20, 2015
Try this:
git config --system -l. It looks for/etc/gitconfigand does not care aboutC:\ProgramData\Git\config. Now, if it does not do that, why shouldgit config --system --edit?kblees commentedon May 20, 2015
Reading through libgit2/libgit2#3040 again, I believe the conclusion was to store system-wide configuration in
%PROGRAMDATA%/Git/configinstead of the installation-specific%PROGRAMFILES%/Git/etc/gitconfig.So introducing a new "super-config" that cannot be addressed via CLI, and
git config --systemreading from / writing to the installation-specific config rather than the system-wide config is quite odd IMO.sschuberth commentedon May 20, 2015
@kblees Exactly my understanding, too. All system related config operations should access
%PROGRAMDATA%\Git\configand nothing else in the new Git version.@dscho I'd say this is a bug then.
dscho commentedon May 21, 2015
Actually, there are already settings that don't make no sense in that Windows-wide config: the location of the SSL certificates is relative to the location of
$prefix/etc/gitconfig. So we actually use both config files.kblees commentedon May 21, 2015
I don't understand that.
ETC_GITCONFIGis used only once ingit_etc_gitconfig(), which is only used in three places, which don't do any relative path mangling.dscho commentedon May 21, 2015
Look at line 14 of the
gitconfigwe install viagit-extra. This path is interpreted relative to the$prefix. It would not make sense in%PROGRAMDATA%\Git\config. But it does make sense in$prefix/etc/gitconfig.kblees commentedon May 21, 2015
Actually I believe a system-wide ca-certificates file makes much more sense than an installation-specific one...e.g. if you add a self-signed certificate of some company-private git server, you don't need to do it for every installation. We'd have to agree on a %PROGRAMDATA% path, of course.
However, I still don't see why the ssl-path issue should hinder us from using %PROGRAMDATA%\Git\config for the system-wide config...these are completely unrelated paths in my understanding. But perhaps I'm just too dumb to grok it.
dscho commentedon May 21, 2015
So now I should install the CA certificates into
%PROGRAMDATA%\Git, too? Unconvinced...dscho commentedon May 22, 2015
Okay, I made up my mind. The arguments I heard so far do not convince me. If
git config --system --editwere to do anything else but to open/etc/gitconfigin an editor, it would be inconsistent behavior, breaking backwards compatibility, and disagreeing with the documentation. Therefore it would be a serious regression to make it so.