(grep, from)
| 117 | |
| 118 | |
| 119 | var readGitLog = function(grep, from) { |
| 120 | var deferred = q.defer(); |
| 121 | |
| 122 | // TODO(vojta): if it's slow, use spawn and stream it instead |
| 123 | child.exec(util.format(GIT_LOG_CMD, grep, '%H%n%s%n%b%n==END==', from), function(code, stdout, stderr) { |
| 124 | var commits = []; |
| 125 | |
| 126 | stdout.split('\n==END==\n').forEach(function(rawCommit) { |
| 127 | var commit = parseRawCommit(rawCommit); |
| 128 | if(commit) commits.push(commit); |
| 129 | }); |
| 130 | |
| 131 | deferred.resolve(commits); |
| 132 | }); |
| 133 | |
| 134 | return deferred.promise; |
| 135 | }; |
| 136 | |
| 137 | |
| 138 | var writeChangelog = function(stream, commits, version) { |
no test coverage detected