summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gbp/git/repository.py7
-rw-r--r--tests/test_GitRepository.py2
2 files changed, 6 insertions, 3 deletions
diff --git a/gbp/git/repository.py b/gbp/git/repository.py
index 5df55713..b1e79059 100644
--- a/gbp/git/repository.py
+++ b/gbp/git/repository.py
@@ -1335,7 +1335,7 @@ class GitRepository(object):
@return: the commit's including id, author, email, subject and body
@rtype: dict
"""
- args = GitArgs('--pretty=format:%an%x00%ae%x00%ad%x00%cn%x00%ce%x00%cd%x00%s%x00%b%x00',
+ args = GitArgs('--pretty=format:%an%x00%ae%x00%ad%x00%cn%x00%ce%x00%cd%x00%s%x00%f%x00%b%x00',
'-z', '--date=raw', '--name-status', commit)
out, err, ret = self._git_inout('show', args.args)
if ret:
@@ -1352,7 +1352,7 @@ class GitRepository(object):
fields[5].strip())
files = defaultdict(list)
- file_fields = fields[8:]
+ file_fields = fields[9:]
# For some reason git returns one extra empty field for merge commits
if file_fields[0] == '': file_fields.pop(0)
while len(file_fields) and file_fields[0] != '':
@@ -1364,7 +1364,8 @@ class GitRepository(object):
'author' : author,
'committer' : committer,
'subject' : fields[6],
- 'body' : fields[7],
+ 'patchname' : fields[7],
+ 'body' : fields[8],
'files' : files}
#{ Patches
diff --git a/tests/test_GitRepository.py b/tests/test_GitRepository.py
index 5a97d314..c4200c02 100644
--- a/tests/test_GitRepository.py
+++ b/tests/test_GitRepository.py
@@ -412,6 +412,8 @@ def test_get_commit_info():
True
>>> (now - datetime.fromtimestamp(int(info['committer'].date.split()[0]))).seconds < 10
True
+ >>> info['patchname']
+ 'foo'
>>> info['files']
defaultdict(<type 'list'>, {'M': ['testfile']})
"""