Skip to content

Commit

Permalink
Merge pull request #679 from spacewander/update_git_changelog_doc
Browse files Browse the repository at this point in the history
Mention how to control changelog format in docs of git-changelog
  • Loading branch information
spacewander authored Nov 13, 2017
2 parents f1aeed4 + 46bc095 commit 82896c8
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
13 changes: 12 additions & 1 deletion man/git-changelog.1
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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>
.
Expand Down
12 changes: 10 additions & 2 deletions man/git-changelog.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion man/git-changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 82896c8

Please sign in to comment.