git: add tests for difftastic

This commit is contained in:
Brian Lyles
2025-09-30 00:29:34 -05:00
committed by Austin Horstman
parent e46b52ab56
commit d328666dba
3 changed files with 31 additions and 0 deletions

View File

@@ -10,4 +10,5 @@
git-with-hooks = ./git-with-hooks.nix;
git-with-maintenance = ./git-with-maintenance.nix;
git-patdiff = ./git-patdiff.nix;
git-difftastic = ./git-difftastic.nix;
}

View File

@@ -0,0 +1,12 @@
[diff]
external = "@difftastic@/bin/difft --color always --background dark --display inline"
tool = "difftastic"
[difftool "difftastic"]
cmd = "@difftastic@/bin/difft --color always --background dark --display inline $LOCAL $REMOTE"
[gpg]
format = "openpgp"
[gpg "openpgp"]
program = "path-to-gpg"

View File

@@ -0,0 +1,18 @@
{
programs.git = {
enable = true;
signing.signer = "path-to-gpg";
difftastic = {
enable = true;
enableAsDifftool = true;
background = "dark";
color = "always";
display = "inline";
};
};
nmt.script = ''
assertFileExists home-files/.config/git/config
assertFileContent home-files/.config/git/config ${./git-difftastic-expected.conf}
'';
}