aboutsummaryrefslogtreecommitdiff
path: root/lib/fetchGitData.js
diff options
context:
space:
mode:
authorHauke Henningsen <[email protected]>2015-04-20 23:17:40 +0200
committerHauke Henningsen <[email protected]>2015-04-20 23:17:40 +0200
commitebb47a974bc0665419cdf9d5c0ed4c4ed95636c8 (patch)
treee71994e02aa5811079ef15ccb13e30c4ab0fe5c0 /lib/fetchGitData.js
parentd5e1372bbd79a9fabbceec9624a220f1a8f75348 (diff)
downloadnode-coveralls-ebb47a974bc0665419cdf9d5c0ed4c4ed95636c8.tar.xz
node-coveralls-ebb47a974bc0665419cdf9d5c0ed4c4ed95636c8.zip
Fix bug #86
Instead of matching the git commit file for emails which contain at least one character, match for “emails” which also may be empty. Also, use greedy regex matching in those places which is likely to be more performant than non-greedy matching.
Diffstat (limited to 'lib/fetchGitData.js')
-rw-r--r--lib/fetchGitData.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/fetchGitData.js b/lib/fetchGitData.js
index 67b6190..a6abba4 100644
--- a/lib/fetchGitData.js
+++ b/lib/fetchGitData.js
@@ -59,7 +59,7 @@ function fetchBranch(git, cb) {
});
}
-var REGEX_COMMIT_DETAILS = /\nauthor (.+?) <(.+?)>.+\ncommitter (.+?) <(.+?)>.+\n?[\S\s]+?\n\n(.*)/m;
+var REGEX_COMMIT_DETAILS = /\nauthor (.+?) <([^>]*)>.+\ncommitter (.+?) <([^>]*)>.+\n?[\S\s]+?\n\n(.*)/m;
function fetchHeadDetails(git, cb) {
exec('git cat-file -p ' + git.head.id, function(err, response) {