From 8b4e46d994c23a6be8b458b18cfea8a94e325b70 Mon Sep 17 00:00:00 2001 From: "Schaaf, Martin" Date: Thu, 11 Sep 2014 00:28:03 +0200 Subject: fix parsing of multiline header responses takes not known headers into account --- lib/fetchGitData.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fetchGitData.js b/lib/fetchGitData.js index a8b2bce..18af04e 100644 --- a/lib/fetchGitData.js +++ b/lib/fetchGitData.js @@ -59,7 +59,7 @@ function fetchBranch(git, cb) { }); } -var REGEX_COMMIT_DETAILS = /\nauthor (.+?) <(.+?)>.+\ncommitter (.+?) <(.+?)>.+\n?.+?\n\n(.*)/m; +var REGEX_COMMIT_DETAILS = /\nauthor (.+?) <(.+?)>.+\ncommitter (.+?) <(.+?)>.+\n?[\w\s]+?\n\n(.*)/m;; function fetchHeadDetails(git, cb) { exec('git cat-file -p ' + git.head.id, function(err, response) { -- cgit v1.2.3 From 537a87c5d289b8bd701779bb6339ea965942d4b5 Mon Sep 17 00:00:00 2001 From: "Schaaf, Martin" Date: Thu, 11 Sep 2014 00:48:09 +0200 Subject: fetch all characters by selecting all whitespace and all none whitespace --- lib/fetchGitData.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fetchGitData.js b/lib/fetchGitData.js index 18af04e..3bebda3 100644 --- a/lib/fetchGitData.js +++ b/lib/fetchGitData.js @@ -59,7 +59,7 @@ function fetchBranch(git, cb) { }); } -var REGEX_COMMIT_DETAILS = /\nauthor (.+?) <(.+?)>.+\ncommitter (.+?) <(.+?)>.+\n?[\w\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) { -- cgit v1.2.3