Skip to content

Update Repo.config_reader to support user $HOME/.config/git/config #160

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

Closed
jzempel opened this issue May 6, 2014 · 3 comments
Closed

Update Repo.config_reader to support user $HOME/.config/git/config #160

jzempel opened this issue May 6, 2014 · 3 comments
Assignees

Comments

@jzempel
Copy link

jzempel commented May 6, 2014

Support for this second user-specific configuration file was added to git in v1.7.12. See commit comments and git documentation for details. Consider adding a "user" config_level to Repo.config_reader between "system" and "global".

@Byron Byron added this to the v0.3.5 - bugfixes milestone Nov 19, 2014
@Byron Byron self-assigned this Jan 10, 2015
@Byron Byron closed this as completed in 597bc56 Jan 10, 2015
@Byron
Copy link
Member

Byron commented Jan 10, 2015

You can see how this was implemented in this youtube video.

@jzempel
Copy link
Author

jzempel commented Jan 11, 2015

@Byron thanks for the fix & the video. I think you're close. But it's not quite right.

Your code would be looking for either $XDG_CONFIG_HOME/.config/git/config or $HOME/.config/git/config. Per the git documentation, it should be $XDG_CONFIG_HOME/git/config.

Please see my Repo class override workaround for details: https://github.com/jzempel/continuity/blob/master/continuity/services/git.py#L38-L58

Byron added a commit that referenced this issue Jan 12, 2015
The point is that XDG_CONFIG_HOME is meant to point at the '.config' directory,
whereas '.config' has to be added only if HOME is used instead.

Fixes #160
Byron added a commit that referenced this issue Jan 12, 2015
For some reason, I didn't trust the existing one as it tests that code
more indirectly.

Related to #160
@Byron
Copy link
Member

Byron commented Jan 12, 2015

Thanks a bunch - you are totally right and I have basically put in the code in your override. Additionally I had a look at the c-git source and it is indeed implemented similarly.

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

No branches or pull requests

2 participants