This new tag makes git-dch use the full commit message when generating
the Debian changelog file, even when --full is not given.
Thanks: Matthijs Kooijman
Closes: #669159
---
docs/chapters/releases.sgml | 12 ++++++++++--
docs/manpages/git-dch.sgml | 11 ++++++++---
gbp/dch.py | 2 +-
3 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/docs/chapters/releases.sgml b/docs/chapters/releases.sgml
index 9d3bf74..d5cf087 100644
--- a/docs/chapters/releases.sgml
+++ b/docs/chapters/releases.sgml
@@ -119,11 +119,19 @@ Git-Dch: Ignore
will not show up in the generated changelog in any way.
</para>
<para>
-To only include the short description in the commit and skip the body use:
+To include the full commit message in the changelog use:
+<screen>
+Git-Dch: Full
+</screen>
+</para>
+<para>
+To only include the short description in the changelog and skip the body use:
<screen>
Git-Dch: Short
</screen>
-This only takes effect when running &git-dch; with the <option>--full</option>
option.
+The latter only takes effect when running &git-dch; with the
+<option>--full</option> option, since including only the short
+description is the default.
</para>
<para>
Usually changelog entries should correspond to a single &git; commit. In this
case it's
diff --git a/docs/manpages/git-dch.sgml b/docs/manpages/git-dch.sgml
index 0d9487c..bf67d50 100644
--- a/docs/manpages/git-dch.sgml
+++ b/docs/manpages/git-dch.sgml
@@ -279,9 +279,14 @@
</term>
<listitem><para>
Supported actions are: <replaceable>Ignore</replaceable> which will
ignore
- this commit when generating <filename>debian/changelog</filename> and
- <replaceable>Short</replaceable> which will only use the description
- (the first line) of the commit message when generating the changelog
entry.
+ this commit when generating <filename>debian/changelog</filename>,
+ <replaceable>Short</replaceable> which will only use the
+ description (the first line) of the commit message when
+ generating the changelog entry (useful when
+ <option>--full</option> is given) and
+ <replaceable>Full</replaceable> which will use the full commit
+ message when generating the changelog entry (useful when
+ <option>--full</option> is not given).
</para></listitem>
</varlistentry>
<varlistentry>
diff --git a/gbp/dch.py b/gbp/dch.py
index c481c16..ddd5e8e 100644
--- a/gbp/dch.py
+++ b/gbp/dch.py
@@ -119,7 +119,7 @@ def format_changelog_entry(commit_info, options,
last_commit=False):
(thanks, body) = extract_thanks_info(body, options)
body = filter_ignore_rx_matches(body, options)
- if options.full and not 'short' in git_dch_cmds:
+ if 'full' in git_dch_cmds or (options.full and not 'short' in
git_dch_cmds):
# Add all non-blank body lines.
entry.extend([line for line in body if line.strip()])
if thanks:
--
1.7.9.5
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]