diff options
Diffstat (limited to '')
-rw-r--r-- | bin/man1/git-comment.1 | 117 |
1 files changed, 117 insertions, 0 deletions
diff --git a/bin/man1/git-comment.1 b/bin/man1/git-comment.1 new file mode 100644 index 00000000..8e958f30 --- /dev/null +++ b/bin/man1/git-comment.1 @@ -0,0 +1,117 @@ +.Dd September 10, 2021 +.Dt GIT-COMMENT 1 +.Os +. +.Sh NAME +.Nm git-comment +.Nd add comments from commit messages +. +.Sh SYNOPSIS +.Nm git comment +.Op Fl \-all +.Op Fl \-comment-start Ar string +.Op Fl \-comment-lead Ar string +.Op Fl \-comment-end Ar string +.Op Fl \-min-group Ar lines +.Op Fl \-min-repeat Ar lines +.Op Fl \-no-repeat +.Op Fl \-pretty Ar format +.Op Ar options ... +.Op Fl \- +.Ar file +. +.Sh DESCRIPTION +The +.Nm +command +adds comments to a file +showing the commit messages +which last modified +each group of lines. +By default only commit messages with bodies +and which modified groups of at least 2 lines +are added. +Each comment contains +the abbreviated commit hash +and the commit summary, +followed by the commit body. +. +.Pp +.Nm +accepts all the options of +.Xr git-blame 1 +in addition to the following: +.Bl -tag -width Ds +.It Fl \-all +Include all commit messages. +The default is to include +only commit messages with bodies +(lines after the summary). +. +.It Fl \-comment-start Ar string +Start comments with +.Ar string . +The default is the value of +.Cm comment.start +or +.Ql /* . +. +.It Fl \-comment-lead Ar string +Continue comments with the leading +.Ar string . +The default is the value of +.Cm comment.lead +or +.Ql " *" . +. +.It Fl \-comment-end Ar string +End comments with +.Ar string . +The default is the value of +.Cm comment.end +or +.Ql " */" . +. +.It Fl \-min-group Ar lines +Add comments only for groups of at least +.Ar lines . +The default is 2 lines. +. +.It Fl \-min-repeat Ar lines +Avoid repeating a comment +if it occurred in the last +.Ar lines . +The default is 30 lines. +. +.It Fl \-no-repeat +Avoid repeating comments entirely. +. +.It Fl \-pretty Ar format +Set the pretty-print format +to use for commit messages. +The default is the value of +.Cm comment.pretty +or +.Ql format:%h\ %s%n%n%-b . +See +.Xr git-show 1 . +.El +. +.Sh EXAMPLES +For files with +.Ql # +comments: +.Bd -literal -offset indent +git config comment.start '#' +git config comment.lead '#' +git config comment.end '' +.Ed +. +.Pp +Add as many comments as possible: +.Bd -literal -offset indent +git comment --all --min-group 1 --min-repeat 1 +.Ed +. +.Sh SEE ALSO +.Xr git-blame 1 |