String (@NotNull @NlsSafe String message) { int nthLine = nthIndexOf(message, '\n', MAX_COMMIT_MESSAGE_LINES); if (nthLine != -1 && nthLine < MAX_COMMIT_MESSAGE_LENGTH) { return trimCommitMessageAt(message, nthLine); } if (message.length() > MAX_COMMIT_MESSAGE_LENGTH + 50) { return trimCommitMessageAt(message, MAX_COMMIT_MESSAGE_LENGTH); } return message; }