Skip to content

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