Skip to content

Commit

Permalink
Merge pull request #84273 from microsoft/joao/release/fix-84201
Browse files Browse the repository at this point in the history
Fixes #84201
  • Loading branch information
joaomoreno authored Nov 8, 2019
2 parents 0314f14 + e26ff4c commit 58b7b74
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions extensions/git/src/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1813,6 +1813,12 @@ export class Repository {
}

cleanupCommitEditMessage(message: string): string {
// If the message is a single line starting with whitespace followed by `#`, just allow it.
if (/^\s*#[^\n]*$/.test(message)) {
return message;
}

// Else, remove all lines starting with whitespace followed by `#`.
//TODO: Support core.commentChar
return message.replace(/^\s*#.*$\n?/gm, '').trim();
}
Expand Down

0 comments on commit 58b7b74

Please sign in to comment.