+ //FIXME: git needs ref BEFORE add
+ //quick hack until http://pear.php.net/bugs/bug.php?id=19605 is fixed
+ //also waiting for https://pear.php.net/bugs/bug.php?id=19623
+ $vc->getCommand('notes --ref=identity add')
+ ->setOption('force')
+ ->setOption('message', "$notes")
+ ->execute();
+ $bChanged = true;
+ }
+
+ if ($bChanged) {
+ //FIXME: index changed files only
+ //also handle file deletions
+ $db = new Database();
+ if ($bNew) {
+ $db->getIndexer()->addRepo($this->repo);
+ } else {
+ $commits = $this->repo->getHistory();
+ $db->getIndexer()->updateRepo(
+ $this->repo,
+ $commits[count($commits)-1]->committerTime,
+ $commits[0]->committerTime
+ );
+ }