From e6a6f63f4c7b9f26c9b19eeb42ef211758ff2f8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jalil=20David=20Salam=C3=A9=20Messina?= Date: Sun, 22 Dec 2024 15:03:12 +0100 Subject: [PATCH] feat(jj): include diff in default commit template This makes it mimic `git commit --verbose` which I like. --- home/default.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/home/default.nix b/home/default.nix index 0331583..5a8f01b 100644 --- a/home/default.nix +++ b/home/default.nix @@ -198,6 +198,20 @@ in enable = true; settings = { ui.pager = "bat"; + # mimic git commit --verbose by adding a diff + templates.draft_commit_description = '' + concat( + description, + surround( + "\nJJ: This commit contains the following changes:\n", "", + indent("JJ: ", diff.stat()), + ), + surround( + "\nJJ: Diff:\n", "", + indent("JJ: ", diff.git()), + ), + ) + ''; }; }; }; -- 2.47.0