HistoryView: Accept an empty email address

This commit is contained in:
Pieter de Bie
2008-12-22 20:40:17 +01:00
parent 641d2dbdce
commit da89f38546
+2 -2
View File
@@ -27,13 +27,13 @@ var Commit = function(obj) {
}
this.header = this.raw.substring(0, messageStart);
var match = this.header.match(/\nauthor (.*) <(.*@.*)> ([0-9].*)/);
var match = this.header.match(/\nauthor (.*) <(.*@.*|)> ([0-9].*)/);
if (!(match[2].match(/@[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}/)))
this.author_email = match[2];
this.author_date = new Date(parseInt(match[3]) * 1000);
match = this.header.match(/\ncommitter (.*) <(.*@.*)> ([0-9].*)/);
match = this.header.match(/\ncommitter (.*) <(.*@.*|)> ([0-9].*)/);
this.committer_name = match[1];
this.committer_email = match[2];
this.committer_date = new Date(parseInt(match[3]) * 1000);