git: add option for difftastic context

The ability to control the number of contextual lines is a basic
expectation of a diff program, so a dedicated option feels warranted.
This commit is contained in:
Brian Lyles 2025-09-30 00:04:31 -05:00 committed by Austin Horstman
parent d328666dba
commit 1652349e57
3 changed files with 13 additions and 2 deletions

View file

@ -1,9 +1,9 @@
[diff]
external = "@difftastic@/bin/difft --color always --background dark --display inline"
external = "@difftastic@/bin/difft --color always --background dark --display inline --context 5"
tool = "difftastic"
[difftool "difftastic"]
cmd = "@difftastic@/bin/difft --color always --background dark --display inline $LOCAL $REMOTE"
cmd = "@difftastic@/bin/difft --color always --background dark --display inline --context 5 $LOCAL $REMOTE"
[gpg]
format = "openpgp"

View file

@ -7,6 +7,7 @@
enableAsDifftool = true;
background = "dark";
color = "always";
context = 5;
display = "inline";
};
};