mirror of
https://github.com/microsoft/vscode.git
synced 2026-10-05 15:36:22 +01:00
fixes #84201
This commit is contained in:
1 file changed
+6
@@ -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();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user