feat(jj): include diff in default commit template #198

Merged
jalil merged 1 commit from jj-commit-diff into main 2024-12-22 15:19:23 +01:00

View file

@ -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()),
),
)
'';
};
};
};