Parse and display commit authorship date in Git in Diffusion

Summary: Fixes T8826. Git tracks an "author date", which may be different from the "committed date". We don't currently extract/show this; do so.

Test Plan: {F1059235}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8826

Differential Revision: https://secure.phabricator.com/D14995
This commit is contained in:
epriestley
2016-01-11 05:19:13 -08:00
parent 9fb929dff3
commit a061bd2d09
5 changed files with 28 additions and 4 deletions

View File

@@ -492,8 +492,12 @@ final class DiffusionCommitController extends DiffusionController {
if (!$repository->isSVN()) {
$authored_info = id(new PHUIStatusItemView());
// TODO: In Git, a distinct authorship date is available. When present,
// we should show it here.
$author_epoch = $data->getCommitDetail('authorEpoch');
if ($author_epoch !== null) {
$authored_info->setNote(
phabricator_datetime($author_epoch, $viewer));
}
if ($author_phid) {
$authored_info->setTarget($handles[$author_phid]->renderLink());