summaryrefslogtreecommitdiff
path: root/gbp/git
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2012-07-02 11:21:03 +0300
committerGuido Günther <agx@sigxcpu.org>2012-07-27 13:45:51 +0200
commit32f725f9e27165c25ef11d61952f22eb29a1f12d (patch)
treec26c52fe29a3123491a94e93a25e43776e86b69e /gbp/git
parent7f9776f85055fd80549eb164aa8fffa4e0e5535f (diff)
GitRepository/get_commit_info: add committer info
Add committer to the info returned by get_commit_info() method. Returns committer name, email and timestamp as a GitModifier object. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Diffstat (limited to 'gbp/git')
-rw-r--r--gbp/git/repository.py10
1 files changed, 7 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):