Skip to content

git config --system --edit should use new "super-config" from "C:\ProgramData\Git\config" #154

Closed

Description

@sschuberth
No description provided.

Activity

  1. 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
  2. linquize commented on May 19, 2015

    @linquize

    What a good name super-config!

  3. sschuberth commented on May 19, 2015

    @sschuberth
    Author

    Well, it was @dscho who came up with that name AFAIK.

  4. dscho commented on May 19, 2015

    @dscho
    Member

    Can't take credit for that... I call it "Windows-wide config".

  5. linquize commented on May 19, 2015

    @linquize

    as it is Windows-specific config file

  6. sschuberth commented on May 19, 2015

    @sschuberth
    Author

    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.

  7. nalla commented on May 20, 2015

    @nalla

    That path comes from ETC_GITCONFIG which is defined here. So to me the question arises, what about ETC_GITATTRIBUTES that is defined one line below?

    Was the location of ETC_GITATTRIBUTES also discussed with https://github.com/libgit2?

  8. dscho commented on May 20, 2015

    @dscho
    Member

    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?

  9. kblees commented on May 20, 2015

    @kblees

    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.

    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.

  10. sschuberth commented on May 20, 2015

    @sschuberth
    Author

    @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.

    @dscho I'd say this is a bug then.

  11. dscho commented on May 21, 2015

    @dscho
    Member

    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.

  12. kblees commented on May 21, 2015

    @kblees

    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.

  13. dscho commented on May 21, 2015

    @dscho
    Member

    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.

  14. kblees commented on May 21, 2015

    @kblees

    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.

  15. dscho commented on May 21, 2015

    @dscho
    Member

    Actually I believe a system-wide ca-certificates file makes much more sense than an installation-specific one.

    So now I should install the CA certificates into %PROGRAMDATA%\Git, too? Unconvinced...

  16. dscho commented on May 22, 2015

    @dscho
    Member

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions