feat(jj): include diff in default commit template
All checks were successful
/ check (push) Successful in 47s
/ build (audiomenu) (push) Successful in 1s
/ build (docs) (push) Successful in 1s
/ build (jpassmenu) (push) Successful in 1s
/ build (nixosConfigurations.vm.config.system.build.toplevel) (push) Successful in 1s
/ build (nvim) (push) Successful in 1s
/ report-size (push) Successful in 4s
All checks were successful
/ check (push) Successful in 47s
/ build (audiomenu) (push) Successful in 1s
/ build (docs) (push) Successful in 1s
/ build (jpassmenu) (push) Successful in 1s
/ build (nixosConfigurations.vm.config.system.build.toplevel) (push) Successful in 1s
/ build (nvim) (push) Successful in 1s
/ report-size (push) Successful in 4s
This makes it mimic `git commit --verbose` which I like.
This commit is contained in:
parent
7e7c5d6517
commit
e6a6f63f4c
1 changed files with 14 additions and 0 deletions
|
@ -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()),
|
||||
),
|
||||
)
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue