From 11997d8a8585b3f02469867d5742e2f4566bf173 Mon Sep 17 00:00:00 2001 From: Erik van Zijst Date: Tue, 16 Aug 2011 16:47:05 +1000 Subject: [PATCH] Added support for commit_time_offset Signed-off-by: Erik van Zijst --- pygit2.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pygit2.c b/pygit2.c index 614dc95..b30bcbe 100644 --- a/pygit2.c +++ b/pygit2.c @@ -989,6 +989,12 @@ Commit_get_commit_time(Commit *commit) return PyLong_FromLong(git_commit_time(commit->commit)); } +static PyObject * +Commit_get_commit_time_offset(Commit *commit) +{ + return PyLong_FromLong(git_commit_time_offset(commit->commit)); +} + static PyObject * Commit_get_committer(Commit *commit) { @@ -1065,6 +1071,8 @@ static PyGetSetDef Commit_getseters[] = { {"message", (getter)Commit_get_message, NULL, "message", NULL}, {"commit_time", (getter)Commit_get_commit_time, NULL, "commit time", NULL}, + {"commit_time_offset", (getter)Commit_get_commit_time_offset, NULL, + "commit time offset", NULL}, {"committer", (getter)Commit_get_committer, NULL, "committer", NULL}, {"author", (getter)Commit_get_author, NULL, "author", NULL}, {"tree", (getter)Commit_get_tree, NULL, "tree object", NULL},