diff options
| author | Justin J. Novack <jnovack@gmail.com> | 2012-09-30 17:43:58 -0400 |
|---|---|---|
| committer | Justin J. Novack <jnovack@gmail.com> | 2012-10-01 17:21:56 -0400 |
| commit | d5901a1fcc8b79f9a23bd3888ef2f281f07b9459 (patch) | |
| tree | b306fba401eadd70e3c042f6c0c935e08cc0c16c /scripts/index.php | |
| parent | 8d29b8e073c9a3795ad7ededf4cb5e8683102162 (diff) | |
| download | phorkie-d5901a1fcc8b79f9a23bd3888ef2f281f07b9459.tar.gz phorkie-d5901a1fcc8b79f9a23bd3888ef2f281f07b9459.zip | |
Use commit timestamps for ElasticSearch and sort on last commit time.
Diffstat (limited to 'scripts/index.php')
| -rw-r--r-- | scripts/index.php | 4 |
1 files changed, 3 insertions, 1 deletions
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); } ?> |
