@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Use committer date instead of author date for Git epoch

Summary:
This is somewhat controversial but push date is usually more useful than commit date (which can be for example a month before other people can see the commit).
We can also store both dates.

Test Plan:
git log --pretty="%ct %at"

Reviewers: epriestley

Reviewed By: epriestley

CC: nh, aran, Koolvin

Differential Revision: https://secure.phabricator.com/D2319

vrana 38ffe45f a0417d97

+2 -13
+1 -1
src/applications/repository/daemon/commitdiscovery/git/PhabricatorRepositoryGitCommitDiscoveryDaemon.php
··· 119 119 while (true) { 120 120 $target = array_pop($insert); 121 121 list($epoch) = $repository->execxLocalCommand( 122 - 'log -n1 --pretty="%%at" %s', 122 + 'log -n1 --pretty="%%ct" %s', 123 123 $target); 124 124 $epoch = trim($epoch); 125 125
+1 -8
src/applications/repository/worker/commitmessageparser/base/PhabricatorRepositoryCommitMessageParserWorker.php
··· 96 96 if ($revision->getStatus() != 97 97 ArcanistDifferentialRevisionStatus::CLOSED) { 98 98 99 - $date_committed = $this->getDateCommitted($commit); 100 - if ($date_committed) { 101 - $revision->setDateCommitted($date_committed); 102 - } 99 + $revision->setDateCommitted($commit->getEpoch()); 103 100 104 101 $message = null; 105 102 $committer = $data->getCommitDetail('authorPHID'); ··· 116 113 } 117 114 } 118 115 } 119 - } 120 - 121 - protected function getDateCommitted(PhabricatorRepositoryCommit $commit) { 122 - return null; 123 116 } 124 117 125 118 /**
-4
src/applications/repository/worker/commitmessageparser/svn/PhabricatorRepositorySvnCommitMessageParserWorker.php
··· 54 54 return array(); 55 55 } 56 56 57 - protected function getDateCommitted(PhabricatorRepositoryCommit $commit) { 58 - return $commit->getEpoch(); 59 - } 60 - 61 57 }