Parcourir la source

jj: show diff when committing/describing

raylu il y a 4 mois
Parent
commit
a236c0e1a7
1 fichiers modifiés avec 11 ajouts et 0 suppressions
  1. 11 0
      config/jj/config.toml

+ 11 - 0
config/jj/config.toml

@@ -28,6 +28,17 @@ tug = ['bookmark', 'move', '--from', 'closest_bookmark(@)', '--to', 'closest_pus
 'closest_bookmark(to)' = 'heads(::to & bookmarks())'
 'closest_pushable(to)' = 'heads(::to & mutable() & ~description(exact:"") & (~empty() | merges()))'
 
+[templates]
+draft_commit_description = '''
+concat(
+  description,
+  "\nJJ: This commit contains the following changes:\n",
+  indent("JJ:     ", diff.stat(72)),
+  "JJ: ignore-rest\n",
+  diff.git(),
+)
+'''
+
 [template-aliases]
 'format_short_signature(signature)' = 'coalesce(signature.email().local(), email_placeholder)'
 log_medium = '''