git: install mergiraf for semantic merging
Alan Pearce alan@alanpearce.eu
Tue, 04 Mar 2025 10:51:11 +0100
1 files changed, 10 insertions(+), 0 deletions(-)
jump to
M user/settings/git.nix → user/settings/git.nix
@@ -70,6 +70,10 @@ }; merge = { conflictStyle = "zdiff3"; }; + "merge.mergiraf" = { + name = "mergiraf"; + driver = "${pkgs.mergiraf}/bin/mergiraf merge --git %O %A %B -s %S -x %X -y %Y -p %P -l %L"; + }; diff = { algorithm = "histogram"; colorMoved = "plain"; @@ -159,11 +163,17 @@ "diff.tool" = [ "${pkgs.difftastic}/bin/difft" "--color=always" "$left" "$right" ]; }; }; }; + xdg.configFile."git/attributes" = { + source = (pkgs.runCommandLocal "mergiraf-gitattributes" { } '' + ${pkgs.mergiraf}/bin/mergiraf languages --gitattributes >> $out + ''); + }; home.packages = with pkgs; [ git-extras # delete-merged-branches and friends git-worktree-switcher ghq # reduce these on server + mergiraf gitui gitstatus hut # sourcehut tools