diff options
| author | Martin Fischer <martin@push-f.com> | 2026-10-10 10:59:30 +0200 |
|---|---|---|
| committer | Martin Fischer <martin@push-f.com> | 2026-10-11 14:40:57 +0200 |
| commit | 36a954ef72f119793bbbbc419428a2716cd3464e (patch) | |
| tree | 020f6ae61f0db0dffb7b01ec5bed89110a480303 | |
| parent | 7c14eeebe237bf718dffba9952568a6dc22129f3 (diff) | |
tweak(user): show diff when writing commit messages
| -rw-r--r-- | user/git/config | 3 | ||||
| -rw-r--r-- | user/jj/config.toml | 15 |
2 files changed, 18 insertions, 0 deletions
diff --git a/user/git/config b/user/git/config index f779a68..876ba4f 100644 --- a/user/git/config +++ b/user/git/config @@ -9,5 +9,8 @@ l = log --pretty='%an %ad %h %s %C(auto)%d' --date=format:'%a %d.%m.%Y %R' -- [branch] sort = -committerdate +[commit] +verbose = true + [push] autoSetupRemote = true diff --git a/user/jj/config.toml b/user/jj/config.toml index 68b1018..ece289e 100644 --- a/user/jj/config.toml +++ b/user/jj/config.toml @@ -12,6 +12,21 @@ l = ["log", "-T", "my_log_oneline", "-r", "..@"] ll = ["log", "-T", "builtin_log_compact_full_description", "-r", "..@"] grep = ["util", "exec", "--", "rg", "--no-require-git", "--no-heading", "--no-line-number", "--sort=path"] +[templates] +# Show diff when writing commit messages. +draft_commit_description = ''' +concat( + description, + surround( + "\nJJ: This commit contains the following changes:\n", "", + indent("JJ: ", diff.summary()), + ), + "\n", + "JJ: ignore-rest\n", + diff.git(), +) +''' + [template-aliases] # The default shows seconds which I don't care about. 'format_timestamp(timestamp)' = 'timestamp.local().format("%Y-%m-%d %H:%M")' |
