We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dd8b177 commit 062d516Copy full SHA for 062d516
1 file changed
extensions/git/src/git.ts
@@ -1813,6 +1813,12 @@ export class Repository {
1813
}
1814
1815
cleanupCommitEditMessage(message: string): string {
1816
+ // If the message is a single line starting with whitespace followed by `#`, just allow it.
1817
+ if (/^\s*#[^\n]*$/.test(message)) {
1818
+ return message;
1819
+ }
1820
+
1821
+ // Else, remove all lines starting with whitespace followed by `#`.
1822
//TODO: Support core.commentChar
1823
return message.replace(/^\s*#.*$\n?/gm, '').trim();
1824
0 commit comments