Skip to content

Commit

Permalink
fix(commit): fix multiline commits with newlines
Browse files Browse the repository at this point in the history
Closes #373
  • Loading branch information
jimthedev committed Jan 6, 2017
1 parent a97e3f8 commit 1d3139f
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/git/commit.js
Expand Up @@ -11,11 +11,9 @@ function normalizeCommitMessage(message) {
/(")/g :
/(["|`])/g;

return dedent(message)
.replace(signs, '\\$1')
.split(/\r?\n/)
.map(line => `-m "${line}"`)
.join(' ');
const msg = ` -m "` + dedent(message)
.replace(signs, '\\$1') + `"`;
return msg;
}

/**
Expand Down

0 comments on commit 1d3139f

Please sign in to comment.