An instance of the VersionControl_Git_Object_Commit provides information about a commit.
<?php
require_once 'VersionControl/Git.php';
$git = new VersionControl_Git('/path/to/repository');
$commits = $git->getCommits();
var_dump($commits[0]->getAuthor());
/*
string(35) "Kousuke Ebihara <kousuke@co3k.org>"
*/
var_dump($commits[0]->getCreatedAt());
/*
int(1503517047)
*/
var_dump($commits[0]->getCommitter());
/*
string(35) "Kousuke Ebihara <kousuke@co3k.org>"
*/
var_dump($commits[0]->getCommittedAt());
/*
int(1503517047)
*/
var_dump($commits[0]->getMessage());
/*
string(62) "changed url to JSON version of dashboard contents (fixes #509)"
*/
var_dump($commits[0]->getParents());
/*
array(1) {
[0]=>
object(VersionControl_Git_Object_Commit)#303 (9) {
}
}
*/
var_dump($commits[0]->getTree());
/*
string(40) "ba2dd3d861f68c6ea31c4cd4444a5d86869a3401"
*/