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

Supports git config includes #371

Merged
merged 1 commit into from Apr 12, 2020

Conversation

simonrw
Copy link
Contributor

@simonrw simonrw commented Apr 11, 2020

I like to have "private" settings in a git include file, and store the
main .gitconfig under version control. I do not want any authentication
keys or tokens (even if encrypted) in version control, so I have by main
.gitconfig include another file which is local and not tracked.

The current implementation calls git config --global --get-regexp <keyPrefix> and for some reason, this command does not follow git
include files.

The changes suggested in this PR add the --includes flag to the
command, which then reads any included files.

I like to have "private" settings in a git include file, and store the
main .gitconfig under version control. I do not want any authentication
keys or tokens (even if encrypted) in version control, so I have by main
.gitconfig include another file which is local and not tracked.

The current implementation calls `git config --global --get-regexp
<keyPrefix>` and for some reason, this command does not follow git
include files.

The changes suggested in this PR add the `--includes` flag to the
command, which then reads any included files.
@MichaelMure
Copy link
Owner

--[no-]includes
Respect include.* directives in config files when looking up values. Defaults to off when a specific file is given (e.g., using --file, --global, etc) and on when searching all config files.

We are using --global here and that switch of the support.

@MichaelMure MichaelMure merged commit d3fc94a into MichaelMure:master Apr 12, 2020
@MichaelMure
Copy link
Owner

Thanks!

@simonrw
Copy link
Contributor Author

simonrw commented Apr 12, 2020

Glad it is useful!

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.

None yet

2 participants