From d5901a1fcc8b79f9a23bd3888ef2f281f07b9459 Mon Sep 17 00:00:00 2001 From: "Justin J. Novack" Date: Sun, 30 Sep 2012 17:43:58 -0400 Subject: Use commit timestamps for ElasticSearch and sort on last commit time. --- scripts/index.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'scripts/index.php') diff --git a/scripts/index.php b/scripts/index.php index 4b529d1..5da912e 100644 --- a/scripts/index.php +++ b/scripts/index.php @@ -37,6 +37,8 @@ $rs = new Repositories(); list($repos, $count) = $rs->getList(0, 10000); foreach ($repos as $repo) { echo 'Indexing ' . $repo->id . "\n"; - $idx->addRepo($repo, filectime($repo->gitDir)); + $commits = $repo->getHistory(); + $first = count($commits)-1; + $idx->addRepo($repo, $commits[$first]->committerTime, $commits[0]->committerTime); } ?> -- cgit v1.2.3