Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

shortsubject: skip when commit is a merge commit #5

Merged
merged 1 commit into from
May 24, 2016

Conversation

tmrts
Copy link

@tmrts tmrts commented May 24, 2016

vr.Pass = false
vr.Msg = "commit subject exceeds 90 characters"
return
}

vr.Pass = true
if len(c["subject"]) > 72 {
vr.Msg = "commit subject is under 90 characters, but is still more than 72 chars"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is no longer necessary true. could do with another conditional branch dealing with the new case

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done PTAL

@tmrts tmrts force-pushed the fix/shortsubject-merge-commits branch from 5d327c0 to e589c9a Compare May 24, 2016 14:46
@@ -21,11 +23,18 @@ func init() {
// ValidateShortSubject checks that the commit's subject is strictly less than
// 90 characters (preferably not more than 72 chars).
func ValidateShortSubject(c git.CommitEntry) (vr validate.Result) {
if len(strings.Split(c["parent"], " ")) <= 1 {
Copy link

@jonboulle jonboulle May 24, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

> 1

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

damn it

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PTAL

@tmrts tmrts force-pushed the fix/shortsubject-merge-commits branch from e589c9a to 754440d Compare May 24, 2016 14:49
@jonboulle jonboulle merged commit 0615c3c into coreos:master May 24, 2016
@tmrts tmrts deleted the fix/shortsubject-merge-commits branch May 24, 2016 15:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants