On Tue, Apr 28, 2009 at 04:23:15PM +0300, Damyan Ivanov wrote:
> Package: git-buildpackage
> Version: 0.4.52
> Severity: normal
> File: /usr/bin/git-dch
> 
> When I try to populate debian/changelog with git-dch, it bails out with:
> 
> Traceback (most recent call last):
>   File "/usr/bin/git-dch", line 382, in <module>
>     sys.exit(main(sys.argv))
>   File "/usr/bin/git-dch", line 354, in main
>     commit_msg, (commit_author, commit_email) = parse_commit(repo, 
> first_commit, options)
>   File "/usr/bin/git-dch", line 204, in parse_commit
>     author, email = get_author(commit)
> TypeError: 'NoneType' object is not iterable
> 
> Steps to reproduce:
> 
> $ git clone git://git.debian.org/git/pkg-perl/apps/padre.git
> $ cd padre
> $ touch debian/foo
> $ git add debian/foo
> $ git commit debian/foo -m 'added foo'
> $ git-dch
> 
> The last release is properly tagged as debian/0.33-1. Same effect if I try
> "git-dch --git-log=debian/0.33-1..HEAD"
> 
> I have tracked the problem to a "pretty = oneline" setting in ~/.gitconfig
> ([format] section). If I comment this setting out, git-dch does the right
> thing.
The attached patch should fix this.
 -- Guido
>From df73d84779ba59a5e3c135c135f4af84b5e0fb80 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Guido=20G=C3=BCnther?= <[email protected]>
Date: Tue, 28 Apr 2009 19:54:15 +0200
Subject: [PATCH] pass --pretty=medium to git show

Closes: #525969
---
 gbp/git_utils.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gbp/git_utils.py b/gbp/git_utils.py
index 0000c66..b6e4b35 100644
--- a/gbp/git_utils.py
+++ b/gbp/git_utils.py
@@ -114,7 +114,7 @@ class GitRepository(object):
 
     def show(self, id):
         """git-show id"""
-        commit, ret = self.__git_getoutput('show', [ id ])
+        commit, ret = self.__git_getoutput('show', [ "--pretty=medium", id ])
         if ret:
             raise GitRepositoryError, "can't get %s" % id
         for line in commit:
-- 
1.6.2.1

Reply via email to