Skip to content

config: normalize the path of the system gitconfig #2370

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

Merged
merged 1 commit into from
Oct 25, 2019

Conversation

dscho
Copy link
Member

@dscho dscho commented Oct 24, 2019

This makes the output of git config --show-origin prettier.

@dscho dscho requested a review from PhilipOakley October 24, 2019 23:06
Git for Windows is compiled with a runtime prefix, and that runtime
prefix is typically `C:/Program Files/Git/mingw64`. As we want the
system gitconfig to live in the sibling directory `etc`, we define the
relative path as `../etc/gitconfig`.

However, as reported by Philip Oakley, the output of `git config
--show-origin --system -l` looks rather ugly, as it shows the path as
`file:C:/Program Files/Git/mingw64/../etc/gitconfig`, i.e. with the
`mingw64/../` part.

By normalizing the path, we get a prettier path.

Signed-off-by: Johannes Schindelin <[email protected]>
@dscho dscho force-pushed the prettify-etc-gitconfig-path branch from af0d658 to 3a5522c Compare October 25, 2019 08:12
@dscho dscho added this to the v2.23.0(2) milestone Oct 25, 2019
@dscho dscho merged commit d1d8fc2 into git-for-windows:master Oct 25, 2019
@dscho dscho deleted the prettify-etc-gitconfig-path branch October 25, 2019 14:09
dscho added a commit that referenced this pull request Oct 25, 2019
config: normalize the path of the system gitconfig
dscho added a commit that referenced this pull request Oct 25, 2019
config: normalize the path of the system gitconfig
dscho added a commit that referenced this pull request Oct 25, 2019
config: normalize the path of the system gitconfig
dscho added a commit that referenced this pull request Oct 25, 2019
config: normalize the path of the system gitconfig
@PhilipOakley
Copy link

The on-list change and comments looked good.
I don't think it got to rc1 (it's not showing there), but I believe that's as expected.

@dscho
Copy link
Member Author

dscho commented Oct 25, 2019

I don't think it got to rc1

No, indeed, it did not make it into -rc1.

@PhilipOakley
Copy link

PhilipOakley commented Oct 25, 2019 via email

git-for-windows-ci pushed a commit that referenced this pull request Oct 28, 2019
config: normalize the path of the system gitconfig
git-for-windows-ci pushed a commit that referenced this pull request Oct 28, 2019
config: normalize the path of the system gitconfig
git-for-windows-ci pushed a commit that referenced this pull request Oct 29, 2019
config: normalize the path of the system gitconfig
git-for-windows-ci pushed a commit that referenced this pull request Oct 30, 2019
config: normalize the path of the system gitconfig
git-for-windows-ci pushed a commit that referenced this pull request Oct 30, 2019
config: normalize the path of the system gitconfig
git-for-windows-ci pushed a commit that referenced this pull request Oct 30, 2019
config: normalize the path of the system gitconfig
@dscho dscho mentioned this pull request Nov 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants