Skip to content

Commit 062d516

Browse files
committed
1 parent dd8b177 commit 062d516

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

extensions/git/src/git.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1813,6 +1813,12 @@ export class Repository {
18131813
}
18141814

18151815
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 `#`.
18161822
//TODO: Support core.commentChar
18171823
return message.replace(/^\s*#.*$\n?/gm, '').trim();
18181824
}

0 commit comments

Comments
 (0)