mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 21:55:38 +00:00
improve long commit check perf
This commit is contained in:
parent
ce4bc1a7bc
commit
729fb540ff
|
@ -142,13 +142,13 @@ export class ChangesView extends EventEmitter.EventEmitter implements GitView.IV
|
|||
return null;
|
||||
}
|
||||
|
||||
if (Strings.trim(value.split('\n')[0]).length > 50) {
|
||||
if (/^[^\n]{51}/.test(value)) {
|
||||
return {
|
||||
content: ChangesView.LONG_COMMIT,
|
||||
type: InputBox.MessageType.WARNING
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue