NEW - bug 327594: Extract contribution information from Git
https://bugs.eclipse.org/bugs/show_bug.cgi?id=327594
diff --git a/commits/common/git-functions.inc b/commits/common/git-functions.inc
index ec26cf1..2b83fef 100755
--- a/commits/common/git-functions.inc
+++ b/commits/common/git-functions.inc
@@ -123,7 +123,10 @@
} else if (preg_match('/^CommitDate: (.*)$/', $line, $matches)) {
// For example:
// CommitDate: Thu Dec 16 23:53:58 2010 -0500
- $processor->data($commit, 'date', $matches[1]);
+ $date = strtotime(trim($matches[1]));
+
+ $processor->data($commit, 'date', $date);
+
} else if (preg_match('/^([0-9]+)\s+([0-9]+)\s+(\w.*)$/', $line, $matches)) {
// For example:
// 2 1 org.eclipse.woolsey.iplog.submit/META-INF/MANIFEST.MF
diff --git a/commits/web-api/git-authors2.php b/commits/web-api/git-authors2.php
index 4a67cc2..e86fa18 100644
--- a/commits/web-api/git-authors2.php
+++ b/commits/web-api/git-authors2.php
@@ -56,10 +56,8 @@
$authorName = mysql_real_escape_string($this->record['authorName']);
$size = $this->record['size'];
$comment = mysql_real_escape_string($this->record['comment']);
- $date = date('Y-m-d h:i:s', strtotime($this->record['date']));
-
- logMessage('Date', $this->record['date']);
-
+ $date = date('Y-m-d h:i:s', $this->record['date']);
+
$sql = "
insert ignore into gitlogcache
(repo, ref, committer, author, authorName, size, comment, commitDate)