From ea674968fdf9bacf7902bf7aa5ef80c0292ec463 Mon Sep 17 00:00:00 2001 From: RGBCube Date: Sun, 27 Apr 2025 01:36:00 +0300 Subject: [PATCH] feat: show diff in jj commit --- modules/common/jujutsu.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/common/jujutsu.nix b/modules/common/jujutsu.nix index 9c93ec4..783d767 100644 --- a/modules/common/jujutsu.nix +++ b/modules/common/jujutsu.nix @@ -35,6 +35,18 @@ in { ui.conflict-marker-style = "snapshot"; ui.graph.style = if config.theme.cornerRadius > 0 then "curved" else "square"; + templates.draft_commit_description = /* python */ '' + concat( + coalesce(description, "\n"), + surround( + "\nJJ: This commit contains the following changes:\n", "", + indent("JJ: ", diff.stat(72)), + ), + "\nJJ: ignore-rest\n", + diff.git(), + ) + ''; + git.auto-local-bookmark = true; git.push-bookmark-prefix = "change-"; git.subprocess = true;