Added support for commit_time_offset

Signed-off-by: Erik van Zijst <erik.van.zijst@gmail.com>
This commit is contained in:
Erik van Zijst
2011-08-16 16:47:05 +10:00
parent 1c9602e58e
commit 11997d8a85

View File

@@ -989,6 +989,12 @@ Commit_get_commit_time(Commit *commit)
return PyLong_FromLong(git_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 * static PyObject *
Commit_get_committer(Commit *commit) Commit_get_committer(Commit *commit)
{ {
@@ -1065,6 +1071,8 @@ static PyGetSetDef Commit_getseters[] = {
{"message", (getter)Commit_get_message, NULL, "message", NULL}, {"message", (getter)Commit_get_message, NULL, "message", NULL},
{"commit_time", (getter)Commit_get_commit_time, NULL, "commit time", {"commit_time", (getter)Commit_get_commit_time, NULL, "commit time",
NULL}, NULL},
{"commit_time_offset", (getter)Commit_get_commit_time_offset, NULL,
"commit time offset", NULL},
{"committer", (getter)Commit_get_committer, NULL, "committer", NULL}, {"committer", (getter)Commit_get_committer, NULL, "committer", NULL},
{"author", (getter)Commit_get_author, NULL, "author", NULL}, {"author", (getter)Commit_get_author, NULL, "author", NULL},
{"tree", (getter)Commit_get_tree, NULL, "tree object", NULL}, {"tree", (getter)Commit_get_tree, NULL, "tree object", NULL},