improve long commit check perf

This commit is contained in:
Joao Moreno 2016-06-09 12:48:21 +02:00
parent ce4bc1a7bc
commit 729fb540ff

View file

@ -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;
}
},