git: configure patdiff through [patdiff] git section (#6978)
This adds the ability to enable the patdiff program as git differ. Website of the project: https://opensource.janestreet.com/patdiff/
This commit is contained in:
parent
50894120e8
commit
2ede089d11
5 changed files with 68 additions and 1 deletions
|
|
@ -9,4 +9,5 @@
|
|||
git-without-signing = ./git-without-signing.nix;
|
||||
git-with-hooks = ./git-with-hooks.nix;
|
||||
git-with-maintenance = ./git-with-maintenance.nix;
|
||||
git-patdiff = ./git-patdiff.nix;
|
||||
}
|
||||
|
|
|
|||
19
tests/modules/programs/git/git-patdiff-expected.conf
Normal file
19
tests/modules/programs/git/git-patdiff-expected.conf
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
[commit]
|
||||
gpgSign = true
|
||||
|
||||
[diff]
|
||||
external = "@patdiff@/bin/patdiff-git-wrapper"
|
||||
|
||||
[gpg]
|
||||
format = "openpgp"
|
||||
|
||||
[gpg "openpgp"]
|
||||
program = "path-to-gpg"
|
||||
|
||||
[tag]
|
||||
gpgSign = true
|
||||
|
||||
[user]
|
||||
email = "user@example.org"
|
||||
name = "John Doe"
|
||||
signingKey = "00112233445566778899AABBCCDDEEFF"
|
||||
20
tests/modules/programs/git/git-patdiff.nix
Normal file
20
tests/modules/programs/git/git-patdiff.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
signing = {
|
||||
signer = "path-to-gpg";
|
||||
format = "openpgp";
|
||||
key = "00112233445566778899AABBCCDDEEFF";
|
||||
signByDefault = true;
|
||||
};
|
||||
userEmail = "user@example.org";
|
||||
userName = "John Doe";
|
||||
|
||||
patdiff.enable = true;
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/git/config
|
||||
assertFileContent home-files/.config/git/config ${./git-patdiff-expected.conf}
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue