commit f0b68fa1cb173f6b5e288d20ae0ba3eb08af2697
parent 0377e7a4077803e7fc6cef0677d0e36a0cba38aa
Author: Vincent Demeester <vincent@sbr.pm>
Date: Mon, 11 Apr 2022 10:31:41 +0200
users/vincent: update git configuration with difftastic
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Diffstat:
1 file changed, 19 insertions(+), 4 deletions(-)
diff --git a/users/vincent/core/git.nix b/users/vincent/core/git.nix
@@ -35,6 +35,7 @@ in
mr
my.prm
my.ape
+ difftastic
];
programs.git = {
enable = true;
@@ -51,20 +52,21 @@ in
aliases = {
b = "branch --color -v";
br = "branch";
+ ca = "commit --amend";
ci = "commit --signoff";
co = "checkout";
conflicts = "!git ls-files --unmerged | cut -c51- | sort -u | xargs $EDITOR";
- ca = "commit --amend";
- wdiff = "diff --color-words";
- unstage = "reset HEAD";
+ dft = "difftool";
lg = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative";
lga = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative --branches --remotes";
lol = "log --pretty=oneline --abbrev-commit --graph --decorate";
ls-ignored = "ls-files --exclude-standard --ignored --others";
resolve = "!git ls-files --unmerged | cut -c51- | sort -u | xargs git add";
- su = "submodule update --init --recursive";
st = "status";
+ su = "submodule update --init --recursive";
+ unstage = "reset HEAD";
w = "status -sb";
+ wdiff = "diff --color-words";
};
attributes = [
"*.org diff=org"
@@ -97,9 +99,22 @@ in
changed = "yellow";
untracked = "red";
};
+ diff = {
+ external = "difft";
+ tool = "difftastic";
+ };
"diff.org" = {
xfuncname = "\"^\\\\*+.*\"";
};
+ difftool = {
+ prompt = false;
+ };
+ "difftool.difftastic" = {
+ cmd = "difft \"$LOCAL\" \"$REMOTE\"";
+ };
+ pager = {
+ difftool = true;
+ };
forge = {
remote = "upstream";
};