mirror of
https://github.com/nix-community/home-manager.git
synced 2026-06-05 21:02:51 +00:00
delta: configure as pager for git blame
This commit is contained in:
committed by
Austin Horstman
parent
561bd67464
commit
0379e433a8
@@ -61,8 +61,8 @@ in
|
||||
Whether to enable git integration for delta.
|
||||
|
||||
When enabled, delta will be configured as git's pager for
|
||||
{command}`diff`, {command}`log`, and {command}`show`, and as git's diff
|
||||
filter for interactive staging.
|
||||
{command}`blame`, {command}`diff`, {command}`log`, and {command}`show`,
|
||||
and as git's diff filter for interactive staging.
|
||||
'';
|
||||
};
|
||||
|
||||
@@ -129,8 +129,8 @@ in
|
||||
let
|
||||
deltaCommand = lib.getExe cfg.package;
|
||||
in
|
||||
lib.hm.git.diffPagerConfig deltaCommand
|
||||
// {
|
||||
lib.recursiveUpdate (lib.hm.git.diffPagerConfig deltaCommand) {
|
||||
pager.blame = deltaCommand;
|
||||
interactive.diffFilter = "${deltaCommand} --color-only";
|
||||
delta = cfg.options;
|
||||
};
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/git/config
|
||||
assertFileContains home-files/.config/git/config '[pager]'
|
||||
assertFileRegex home-files/.config/git/config 'blame = .*/bin/delta'
|
||||
assertFileRegex home-files/.config/git/config 'diff = .*/bin/delta'
|
||||
assertFileRegex home-files/.config/git/config 'log = .*/bin/delta'
|
||||
assertFileRegex home-files/.config/git/config 'show = .*/bin/delta'
|
||||
|
||||
Reference in New Issue
Block a user