summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gbp/git/repository.py10
-rw-r--r--tests/test_GitRepository.py4
2 files changed, 11 insertions, 3 deletions
diff --git a/gbp/git/repository.py b/gbp/git/repository.py
index 3dde513..9f70dd1 100644
--- a/gbp/git/repository.py
+++ b/gbp/git/repository.py
@@ -1209,7 +1209,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%s%x00%b%x00',
+ args = GitArgs('--pretty=format:%an%x00%ae%x00%ad%x00%cn%x00%ce%x00%cd%x00%s%x00%b%x00',
'-z', '--quiet', '--date=raw', commit)
out, err, ret = self._git_inout('show', args.args)
if ret:
@@ -1221,11 +1221,15 @@ class GitRepository(object):
author = GitModifier(fields[0].strip(),
fields[1].strip(),
fields[2].strip())
+ committer = GitModifier(fields[3].strip(),
+ fields[4].strip(),
+ fields[5].strip())
return {'id' : commit,
'author' : author,
- 'subject' : fields[3],
- 'body' : fields[4]}
+ 'committer' : committer,
+ 'subject' : fields[6],
+ 'body' : fields[7]}
#{ Patches
def format_patches(self, start, end, output_dir, signature=True, thread=None):
diff --git a/tests/test_GitRepository.py b/tests/test_GitRepository.py
index b91be61..5a590ff 100644
--- a/tests/test_GitRepository.py
+++ b/tests/test_GitRepository.py
@@ -362,9 +362,13 @@ def test_get_commit_info():
'foo'
>>> '@' in info['author'].email
True
+ >>> '@' in info['committer'].email
+ True
>>> now = datetime.now()
>>> (now - datetime.fromtimestamp(int(info['author'].date.split()[0]))).seconds < 10
True
+ >>> (now - datetime.fromtimestamp(int(info['committer'].date.split()[0]))).seconds < 10
+ True
"""
def test_mirror_clone():