aboutsummaryrefslogtreecommitdiffhomepage
path: root/git-dch
diff options
context:
space:
mode:
authorGuido Guenther <agx@sigxcpu.org>2008-05-16 14:19:42 +0200
committerGuido Guenther <agx@sigxcpu.org>2008-05-16 14:22:43 +0200
commitce152d4078c0fc93845865cadda816c7c9ebabe4 (patch)
tree958e646c75fdb5ec284ee39542b303dc6b9ba45b /git-dch
parent6886317f1b81e9a20ae4d57b8942bec65c4233e7 (diff)
include the commit id in the changelog entry
Diffstat (limited to 'git-dch')
-rwxr-xr-xgit-dch5
1 files changed, 5 insertions, 0 deletions
diff --git a/git-dch b/git-dch
index a46805a3..147c9b36 100755
--- a/git-dch
+++ b/git-dch
@@ -182,6 +182,8 @@ def parse_commit(repo, commitid, options):
if thanks:
thanks = ' - thanks to %s' % thanks
msg += closes + thanks
+ if options.idlen:
+ msg = "[%s] " % commitid[0:options.idlen] + msg
return msg, (author, email)
@@ -231,6 +233,9 @@ def main(argv):
help="parse meta tags in commit messages, default is '%(meta)s'", action="store_true")
parser.add_option("--full", action="store_false", dest="short", default=True,
help="include the full commit message")
+ parser.add_config_file_option(option_name="id-length", dest="idlen",
+ help="include N digits of the commit id in the changelog entry, default is '%(id-length)s'",
+ type="int", metavar="N")
(options, args) = parser.parse_args(argv[1:])
if options.snapshot and options.release: