Git-Dch: Full in commit messages
authorMatthijs Kooijman <matthijs@stdin.nl>
Tue, 17 Apr 2012 20:41:48 +0000 (22:41 +0200)
committerGuido Günther <agx@sigxcpu.org>
Wed, 18 Apr 2012 07:38:04 +0000 (09:38 +0200)
This new tag makes git-dch use the full commit message when generating
the Debian changelog file, even when --full is not given.

Closes: #669159
Signed-off-by: Guido Günther <agx@sigxcpu.org>
docs/chapters/releases.sgml
docs/manpages/git-dch.sgml
gbp/dch.py

index 9d3bf747d1daf072e4cce76015f3b16676d45628..d5cf087139fc24ae3b720db026dc25f19f8f54ff 100644 (file)
@@ -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
index 3059f8d2c8d47203156f96a749872163e8bd7b06..6dfe7bb9852b925a74b7d076f741b24c80df1cb9 100644 (file)
         </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>
index c481c16f93759654cf50d0e28c4f91b1964d7098..ddd5e8e9342196f045fe5986a2111454107ca175 100644 (file)
@@ -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: