소스 검색

jj: show diff when committing/describing

raylu 4 달 전
부모
커밋
a236c0e1a7
1개의 변경된 파일11개의 추가작업 그리고 0개의 파일을 삭제
  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 = '''