Merge commit 'refs/pull/45254/head' of github.com:Microsoft/vscode into pr/45254

This commit is contained in:
Joao Moreno
2018-06-04 16:50:58 +02:00

View File

@@ -559,6 +559,15 @@ export class Repository implements Disposable {
return;
}
const whitespacesOnly = text.length && !text.replace(/\s/g, '');
if (whitespacesOnly) {
return {
message: localize('commitMessageWhitespacesOnlyWarning', "Current commit message only contains whitespaces"),
type: SourceControlInputBoxValidationType.Warning
};
}
let start = 0, end;
let match: RegExpExecArray | null;
const regex = /\r?\n/g;