From f6d236eafc1aa85653210c5ff81a1ec0099851ae Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Mon, 17 Mar 2025 12:43:12 +0000 Subject: [PATCH] home: jj: use verbose draft commit messages --- modules/home/jujutsu/default.nix | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/modules/home/jujutsu/default.nix b/modules/home/jujutsu/default.nix index eaf56e9..ff07448 100644 --- a/modules/home/jujutsu/default.nix +++ b/modules/home/jujutsu/default.nix @@ -40,6 +40,28 @@ in lola = [ "lol" "-r" "all()" ]; }; + templates = { + # Equivalent to `commit.verbose = true` in Git + draft_commit_description = "commit_description_verbose(self)"; + }; + + template-aliases = { + "commit_description_verbose(commit)" = '' + concat( + commit_description(commit), + "JJ: ignore-rest\n", + diff.git(), + ) + ''; + "commit_description(commit)" = '' + concat( + commit.description(), "\n", + "JJ: This commit contains the following changes:\n", + indent("JJ: ", diff.stat(72)), + ) + ''; + }; + "--scope" = [ # Multiple identities {