Skip to content

Commit

Permalink
Add support for multiline commits
Browse files Browse the repository at this point in the history
  • Loading branch information
gjtorikian committed Mar 29, 2012
1 parent 323548a commit 4910bfc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 0 additions & 3 deletions BLAH.txt

This file was deleted.

8 changes: 8 additions & 0 deletions server/cloud9/ext/git/git.js
Expand Up @@ -67,6 +67,14 @@ sys.inherits(ShellGitPlugin, Plugin);
var _self = this;
var argv = message.argv || [];

// git encourages newlines in commit messages; see also #678
// so if a \n is detected, treat the whole commit message as a newline
if (message.argv[1] == "commit" && message.argv[2] == "-m") {
if (message.argv[3].indexOf("\\n") > -1) {
message.argv[3] = message.argv[3].replace(/\\n/g,"\n");
}
}

this.spawnCommand(message.command, argv.slice(1), message.cwd,
function(err) { // Error
_self.sendResult(0, message.command, {
Expand Down

0 comments on commit 4910bfc

Please sign in to comment.