1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Ensure commit list has a refs object even if empty

This commit is contained in:
Nick O'Leary 2018-02-07 11:33:07 +00:00
parent 42a7e902e6
commit 4a5cb7f2f5
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -296,8 +296,12 @@ function parseLog(log) {
var m = /^(.*): (.*)$/.exec(l);
if (m) {
// git 2.1.4 (Debian Stable) doesn't support %D for refs - so filter out
if (m[1] === 'refs' && m[2] && m[2] !== '%D') {
currentCommit[m[1]] = m[2].split(",").map(function(v) { return v.trim() });
if (m[1] === 'refs' && m[2]) {
if (m[2] !== '%D') {
currentCommit[m[1]] = m[2].split(",").map(function(v) { return v.trim() });
} else {
currentCommit[m[1]] = [];
}
} else {
if (m[1] === 'parents') {
currentCommit[m[1]] = m[2].split(" ");