Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for %PROGRAMDATA%\Git\config #104

Merged
merged 2 commits into from
Apr 22, 2015

Conversation

dscho
Copy link
Member

@dscho dscho commented Apr 22, 2015

As discussed in libgit2/libgit2#3040, the Windows-based Git projects (both Git for Windows and libgit2) would like to share configuration. It was determined that the best (and most "Windows") way is to have the system-wide configuration in %PROGRAMDATA%\Git\config.

This requires three changes in Git for Windows:

  • we need to read from that location first, before looking in etc/gitconfig and the rest
  • we need to update the documentation to state that new behavior
  • we need to teach the installer to copy over existing etc/gitconfig from Git for Windows 1.x setups

dscho added 2 commits April 22, 2015 14:47
Between the libgit2 and the Git for Windows project, there has been a
discussion how we could share Git configuration to avoid duplication (or
worse: skew).

Earlier, libgit2 was nice enough to just re-use Git for Windows'

	C:\Program Files (x86)\Git\etc\gitconfig

but with the upcoming Git for Windows 2.x, there would be more paths to
search, as we will have 64-bit and 32-bit versions, and the
corresponding config files will be in %PROGRAMFILES%\Git\mingw64\etc and
...\mingw32\etc, respectively.

Therefore we came to a consensus to use %PROGRAMDATA%\Git as the
location for Git-specific files that are of wider interest than just Git
for Windows.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho
Copy link
Member Author

dscho commented Apr 22, 2015

@ethomson would you care to take a look? It seems to work as expected.

dscho added a commit that referenced this pull request Apr 22, 2015
Add support for %PROGRAMDATA%\Git\config
@dscho dscho merged commit 027ca35 into git-for-windows:master Apr 22, 2015
@dscho dscho deleted the super-config branch April 22, 2015 19:42
@dscho
Copy link
Member Author

dscho commented Apr 22, 2015

I merged already to go forward with a merging rebase; please feel free to review, still. With the merging rebase workflow, we can fix commits even after merging the PRs.

dscho added a commit that referenced this pull request Apr 23, 2015
Add support for %PROGRAMDATA%\Git\config

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@ethomson
Copy link
Member

🆒

dscho added a commit that referenced this pull request Apr 30, 2015
Add support for %PROGRAMDATA%\Git\config

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho added a commit that referenced this pull request May 1, 2015
Add support for %PROGRAMDATA%\Git\config

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@csware
Copy link

csware commented May 9, 2015

What about template dir?

@dscho
Copy link
Member Author

dscho commented May 14, 2015

What about template dir?

The templates provide Bash scripts to be adjusted by the user. Unless I am mistaken, libgit2 does not even support them, correct? I would not worry about them if that is the case.

dscho added a commit that referenced this pull request May 14, 2015
Add support for %PROGRAMDATA%\Git\config

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@csware
Copy link

csware commented May 17, 2015

libgit2 does support the template dir for creating new repositories - however, libgit2 does not support hooks out of the box.
Also a template dir can be used to fill default excludein the info directory.

@dscho
Copy link
Member Author

dscho commented May 20, 2015

@csware is there already support in libgit2 for the templates in %PROGRAMDATA%\Git?

@csware
Copy link

csware commented May 20, 2015

@dscho: Not yet (see the TODO on the libgit2 merge request). I did not implement this if this is not supported by Git for Windows.

@dscho
Copy link
Member Author

dscho commented May 21, 2015

Okay. I won't implement it unless it is really needed, either ;-)

nalla pushed a commit that referenced this pull request May 27, 2015
Add support for %PROGRAMDATA%\Git\config

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho added a commit that referenced this pull request May 27, 2015
Back out the super-config branch in favor of the program-data-config
branch (which is a better version of the same feature).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants