git: add option to define store names for generated include files (#3171)
This allows to use gitconfig/gitconfig-some-intent as store path suffixes for the texts.
This commit is contained in:
parent
3d3bbdfe95
commit
5bb1f67568
3 changed files with 24 additions and 4 deletions
|
|
@ -56,3 +56,6 @@
|
|||
|
||||
[includeIf "gitdir:~/src/dir"]
|
||||
path = "@git_include_path@"
|
||||
|
||||
[includeIf "gitdir:~/src/otherproject"]
|
||||
path = "@git_named_include_path@"
|
||||
|
|
|
|||
|
|
@ -14,7 +14,9 @@ let
|
|||
substituteExpected = path:
|
||||
pkgs.substituteAll {
|
||||
src = path;
|
||||
git_include_path = pkgs.writeText "contents"
|
||||
git_include_path = pkgs.writeText "hm_gitconfig"
|
||||
(builtins.readFile ./git-expected-include.conf);
|
||||
git_named_include_path = pkgs.writeText "hm_gitconfigwork"
|
||||
(builtins.readFile ./git-expected-include.conf);
|
||||
};
|
||||
|
||||
|
|
@ -46,6 +48,11 @@ in {
|
|||
condition = "gitdir:~/src/dir";
|
||||
contents = gitInclude;
|
||||
}
|
||||
{
|
||||
condition = "gitdir:~/src/otherproject";
|
||||
contents = gitInclude;
|
||||
contentSuffix = "gitconfig-work";
|
||||
}
|
||||
];
|
||||
signing = {
|
||||
gpgPath = "path-to-gpg";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue