Skip to content

Supports git config includes#371

Merged
MichaelMure merged 1 commit intogit-bug:masterfrom
simonrw:config-reads-includes
Apr 12, 2020
Merged

Supports git config includes#371
MichaelMure merged 1 commit intogit-bug:masterfrom
simonrw:config-reads-includes

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
Contributor

--[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 git-bug:master Apr 12, 2020
@MichaelMure
Copy link
Contributor

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.

2 participants