From 43aefd2369b74f318679d237430d8c18ac4f3286 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 10 Feb 2025 12:03:48 +0100 Subject: [PATCH] jj: Automatically show git diff for commit descriptions --- vcs/jj/config/jj/config.toml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/vcs/jj/config/jj/config.toml b/vcs/jj/config/jj/config.toml index 1636b18..6f5f82d 100644 --- a/vcs/jj/config/jj/config.toml +++ b/vcs/jj/config/jj/config.toml @@ -18,3 +18,16 @@ pager = "delta" [ui.diff] format = "git" # for the time being to use delta well + +[templates] +draft_commit_description = ''' +concat( + description, + surround( + "\nJJ: This commit contains the following changes:\n", "", + indent("JJ: ", diff.stat(72)), + ), + "\nJJ: ignore-rest\n", + diff.git(), +) +'''