aboutsummaryrefslogtreecommitdiffhomepage
path: root/git-dch
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2010-08-02 21:58:04 +0200
committerGuido Günther <agx@sigxcpu.org>2010-08-02 22:03:33 +0200
commit04377ba027f03c4d5e47f9cfb0b8bfa4eac8a25b (patch)
tree65eca17ba2e517fa782c82d4b862e90321f184d4 /git-dch
parent3ed1a5caaf33c41f4c376afdae23036d78387d6b (diff)
Don't insert a dot if the second line starts with a punctuation
Git-Dch: Ignore
Diffstat (limited to 'git-dch')
-rwxr-xr-xgit-dch3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-dch b/git-dch
index 59eb1c2d..b1ce409f 100755
--- a/git-dch
+++ b/git-dch
@@ -56,11 +56,12 @@ def punctuate_commit(msg):
if len(lines) <= 1:
return msg
first, rest = lines
+ # Don't add a dot on one line commit messages
if not rest:
return msg
if first and ispunct(first[-1]):
return msg
- if rest[0].islower():
+ if ispunct(rest[0]) or rest[0].islower():
return msg
return "%s.\n%s" % (first, rest)