@@ -16,7 +16,7 @@ commitmsgfmt - Format commit messages
16
16
{self} *--version*
17
17
{self} *-h*
18
18
{self} *--help*
19
- {self} [*--width* _NUM_]
19
+ {self} [*--comment-string* _STR_] [*-- width* _NUM_]
20
20
21
21
== Description
22
22
@@ -47,9 +47,15 @@ Display this help and exit.
47
47
48
48
Output version information and exit.
49
49
50
+ *-c*, *--comment-string* _STR_::
51
+
52
+ Specify the prefix string that identifies the current line in the commit
53
+ message editor as a comment line. Default *#*. For Jujutsu use *JJ:*. If
54
+ specified multiple times only the last occurrence is used.
55
+
50
56
*-w*, *--width* _NUM_::
51
57
52
- Specify the max allowed width of body text. Default 72 . If specified multiple
58
+ Specify the max allowed width of body text. Default *72* . If specified multiple
53
59
times only the last occurrence is used.
54
60
55
61
== Details
@@ -88,8 +94,8 @@ of implementation and performance comparability. This may change.
88
94
rules laid out above cause degenerative behavior. {self} attempts to detect
89
95
those cases and avoid them by preventing wrapping: it will
90
96
91
- * never break a line immediately before the *core.commentChar* character , which
92
- would cause the second line to degenerate into a _comment_;
97
+ * never break a line immediately before the _comment string_ , which would cause
98
+ the second line to degenerate into a _comment_;
93
99
94
100
* never break a line immediately before any sequence of punctuation, such as
95
101
_ellipses_ and _en_--dashes, which would cause a distraction after the pause
@@ -292,19 +298,28 @@ quote with an author attribution, illustrated above.
292
298
293
299
=== Comment
294
300
295
- A line starting with the *core.commentChar* character, or a hash sign (*#*)
296
- when that setting is unset, is considered a _comment_. Comments are not
297
- wrapped. If the whole line matches the _scissor_ marker it is instead
298
- considered _scissored_.
301
+ A line starting with the specified _comment string_ is considered a _comment_.
302
+ Comments are not wrapped. If the whole line matches the _scissor_ marker it is
303
+ instead considered _scissored_.
304
+
305
+ The _comment string_ is given by
306
+
307
+ . the *--comment-string* option value, or
308
+ . the *core.commentChar* configuration value, or
309
+ . the *core.commentString* configuration value since Git 2.45.0, or
310
+ . the hash sign (*#*) when none of the other options are specified.
299
311
300
312
{self} currently does not support the special *auto* value for
301
313
*core.commentChar*. In that case, {self} falls back to the hash sign.
302
314
303
315
=== Scissored
304
316
305
- A line matching the _scissor_ marker, as defined by *git-commit*(1), denotes
306
- the start of scissored content. Everything from the scissor to the end of the
307
- stream is printed verbatim. *git commit --verbose* relies on this.
317
+ A line matching the _scissor_ marker denotes the start of scissored content.
318
+ Everything from the scissor to the end of the stream is printed verbatim. *git
319
+ commit --verbose* relies on this.
320
+
321
+ The _scissor_ marker is as defined by *git-commit*(1) or alternatively the
322
+ literal _comment string_ suffix *ignore-rest* used by Jujutsu.
308
323
309
324
== Usage
310
325
0 commit comments