forked from qt-creator/qt-creator
VCS: Fix commit message verification for empty subject
For commit messages with empty subject and full body no warning was shown so far. Example: " This is now considered as commit message with a very short subject, but was valid before. " Change-Id: Iee24b022cd53dc9d2eb71f47571221e4dda9ba08 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
committed by
André Hartmann
parent
5d1d6c83a4
commit
4da225f7af
@@ -539,11 +539,11 @@ void SubmitEditorWidget::verifyDescription()
|
||||
subjectLength = descriptionLength;
|
||||
}
|
||||
|
||||
enum { MaxSubjectLength = 72, WarningSubjectLength = 55 };
|
||||
enum { MinSubjectLength = 20, MaxSubjectLength = 72, WarningSubjectLength = 55 };
|
||||
QStringList hints;
|
||||
QStringList toolTips;
|
||||
if (descriptionLength < 20)
|
||||
hints.append(warning + tr("Warning: The commit message is very short."));
|
||||
if (subjectLength < MinSubjectLength)
|
||||
hints.append(warning + tr("Warning: The commit subject is very short."));
|
||||
|
||||
if (subjectLength > MaxSubjectLength)
|
||||
hints.append(warning + tr("Warning: The commit subject is too long."));
|
||||
|
Reference in New Issue
Block a user