Mention how to control changelog format in docs of git-changelog

This commit is contained in:
spacewander 2017-11-10 11:20:08 +08:00
parent e7ca960f0c
commit 46bc0959e1
3 changed files with 29 additions and 4 deletions

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "GIT\-CHANGELOG" "1" "December 2015" "" ""
.TH "GIT\-CHANGELOG" "1" "November 2017" "" ""
.
.SH "NAME"
\fBgit\-changelog\fR \- Generate a changelog report
@ -18,6 +18,17 @@ Generates a changelog from git(1) tags (annotated or lightweight) and commit mes
.P
If no tags exist, then all commits are output; if tags exist, then only the most\-recent commits are output up to the last identified tag\. This behavior can be changed by specifying one or both of the range options (\-f|\-\-final\-tag and \-s|\-\-start\-tag)\.
.
.P
You could customize the changelog format via some git config options\.
.
.IP "\(bu" 4
\fBgit config changelog\.format $format\fR controls the format of each commit\. It will be passed as \fBgit log \-\-pretty=format:$format\fR\. The default value is \fB* %s\fR\.
.
.IP "\(bu" 4
\fBgit config changelog\.mergeformat $format\fR is like changelog\.format but only used when \fB\-\-merges\-only\fR is specified\. The default value is \fB* %s%n%w(64,4,4)%b\fR\.
.
.IP "" 0
.
.SH "OPTIONS"
<file>
.

View file

@ -85,6 +85,14 @@
<p> If no tags exist, then all commits are output; if tags exist, then only the most-recent commits are output up to the last identified tag. This behavior can be changed by specifying one or both of the range options (-f|--final-tag and -s|--start-tag).</p>
<p> You could customize the changelog format via some git config options.</p>
<ul>
<li><p><code>git config changelog.format $format</code> controls the format of each commit. It will be passed as <code>git log --pretty=format:$format</code>. The default value is <code> * %s</code>.</p></li>
<li><p><code>git config changelog.mergeformat $format</code> is like changelog.format but only used when <code>--merges-only</code> is specified. The default value is <code>* %s%n%w(64,4,4)%b</code>.</p></li>
</ul>
<h2 id="OPTIONS">OPTIONS</h2>
<p> &lt;file&gt;</p>
@ -163,7 +171,7 @@
<h2 id="AUTHOR">AUTHOR</h2>
<p>Written by Mark Eissler &lt;<a href="&#x6d;&#x61;&#x69;&#x6c;&#x74;&#x6f;&#x3a;&#109;&#x61;&#x72;&#x6b;&#64;&#x6d;&#x69;&#x78;&#116;&#117;&#114;&#x2e;&#x63;&#111;&#x6d;" data-bare-link="true">&#x6d;&#97;&#114;&#x6b;&#64;&#109;&#x69;&#x78;&#116;&#117;&#114;&#x2e;&#x63;&#x6f;&#x6d;</a>&gt;</p>
<p>Written by Mark Eissler &lt;<a href="&#109;&#x61;&#x69;&#x6c;&#116;&#x6f;&#58;&#x6d;&#97;&#114;&#107;&#64;&#x6d;&#x69;&#120;&#x74;&#x75;&#114;&#x2e;&#x63;&#111;&#x6d;" data-bare-link="true">&#x6d;&#x61;&#x72;&#x6b;&#64;&#109;&#x69;&#x78;&#x74;&#x75;&#114;&#46;&#99;&#111;&#109;</a>&gt;</p>
<h2 id="REPORTING-BUGS">REPORTING BUGS</h2>
@ -176,7 +184,7 @@
<ol class='man-decor man-foot man foot'>
<li class='tl'></li>
<li class='tc'>December 2015</li>
<li class='tc'>November 2017</li>
<li class='tr'>git-changelog(1)</li>
</ol>

View file

@ -12,6 +12,12 @@ git-changelog(1) -- Generate a changelog report
If no tags exist, then all commits are output; if tags exist, then only the most-recent commits are output up to the last identified tag. This behavior can be changed by specifying one or both of the range options (-f|--final-tag and -s|--start-tag).
You could customize the changelog format via some git config options.
* `git config changelog.format $format` controls the format of each commit. It will be passed as `git log --pretty=format:$format`. The default value is ` * %s`.
* `git config changelog.mergeformat $format` is like changelog.format but only used when `--merges-only` is specified. The default value is `* %s%n%w(64,4,4)%b`.
## OPTIONS
&lt;file&gt;
@ -44,7 +50,7 @@ git-changelog(1) -- Generate a changelog report
-m, --merges-only
Uses only merge commits (commits with more than 1 parent) for generated changelog. It also changes the default format to include the merge commit messages body, as on github the commits subject line only contains the branch name but no information about the content of the merge.
Uses only merge commits (commits with more than 1 parent) for generated changelog. It also changes the default format to include the merge commit messages body, as on github the commits subject line only contains the branch name but no information about the content of the merge.
-p, --prune-old