forked from git/git
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
config: introduce an Operating System-specific
includeIf
condition
It is relatively common for users to maintain identical `~/.gitconfig` files across all of their setups, using the `includeIf` construct liberally to adjust the settings to the respective setup as needed. In case of Operating System-specific adjustments, Git currently offers no support to the users and they typically use a work-around like this: [includeIf "gitdir:/home/"] path = ~/.gitconfig-linux [includeIf "gitdir:/Users/"] path = ~/.gitconfig-mac [includeIf "gitdir:C:"] path = ~/.gitconfig-windows However, this is fragile, as it would not even allow to discern between Operating Systems that happen to host their home directories in `/home/`, such as Linux and the BSDs. Let's introduce a new condition: `os:<uname-s>` where `<uname-s>` is the system name, i.e. the output of `uname -s`. This addresses git-for-windows#4125 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
- Loading branch information
Showing
3 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters