Guido Günther wrote:

>  git-buildpackage (0.5.1) experimental; urgency=low
>  .
>    [ Jonathan Nieder ]
>    * [a650ce3] Add prebuild hook Can be used to add an upstream changelog
>      generated from the git repository to the build dir. (Closes: #587652)
>  .
>    [ Guido Günther ]
>    * [9b8bc60] Bump standards version

Thanks!

Sorry about the poorly formatted log message.  Well, live and learn.

diff --git a/git-dch b/git-dch
index 501d1b9..8e33d31 100755
--- a/git-dch
+++ b/git-dch
@@ -73,14 +73,28 @@ def spawn_dch(msg='', author=None, email=None, 
newversion=False, version=None, r
     system(cmd)
 
 
+def ispunct(ch):
+    return not ch.isalnum() and not ch.isspace()
+
+def punctuate_commit(msg):
+    lines = msg.split('\n', 1)
+    if len(lines) <= 1:
+        return msg
+    first, rest = lines
+    if not rest:
+        return msg
+    if first and ispunct(first[-1]):
+        return msg
+    return "%s.\n%s" % (first, rest)
+
 def add_changelog_entry(msg, author, email):
-    "add aa single changelog entry"
-    spawn_dch(msg=msg, author=author, email=email)
+    "add a single changelog entry"
+    spawn_dch(msg=punctuate_commit(msg), author=author, email=email)
 
 
 def add_changelog_section(msg, distribution, author=None, email=None, 
version=None):
     "add a new changelog section"
-    spawn_dch(msg=msg, newversion= True, version=version, author=author, 
email=email, distribution=distribution)
+    spawn_dch(msg=punctuate_commit(msg), newversion= True, version=version, 
author=author, email=email, distribution=distribution)
 
 
 def fixup_trailer(repo, git_author=False):
-- 



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to