提交 32d319c0 编写于 作者: J Joao Moreno

💄

上级 495906f0
......@@ -559,11 +559,9 @@ export class Repository implements Disposable {
return;
}
const whitespacesOnly = text.length && !text.replace(/\s/g, '');
if (whitespacesOnly) {
if (/^\s+$/.test(text)) {
return {
message: localize('commitMessageWhitespacesOnlyWarning', "Current commit message only contains whitespaces"),
message: localize('commitMessageWhitespacesOnlyWarning', "Current commit message only contains whitespace characters"),
type: SourceControlInputBoxValidationType.Warning
};
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册