diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2011-11-18 20:42:32 +0100 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2011-11-18 21:25:56 +0100 |
commit | 41a274cc0da7f9ef498903a5d06de1778fe09f35 (patch) | |
tree | e39f39c28b339dfbc23e91cabd1c181efb14703b /git-hooks | |
parent | 9ad0004c8d644fe008903684cba88a010022fe53 (diff) |
don't complain about long summaries in reverts
it may in fact make sense to disable most checks for reverts. but then,
there is no reason why the restored code should be just as bad as the
original one, so leave them in.
(cherry picked from commit 54ee24f2109e0b2b4a3ff2eee34c35b4c5663164)
Diffstat (limited to 'git-hooks')
-rwxr-xr-x | git-hooks/sanitize-commit | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/git-hooks/sanitize-commit b/git-hooks/sanitize-commit index eeacfdc..2296889 100755 --- a/git-hooks/sanitize-commit +++ b/git-hooks/sanitize-commit @@ -95,10 +95,10 @@ while (<MSG>) { } elsif (!$iswip && !$badlog && length($_) < 7) { &complain("Log message summary is too short", "log"); $badlog = 1; - } elsif (!$badlog && length($_) > 120) { + } elsif (!$badlog && !$revert1 && length($_) > 120) { &complain("Log message summary is excessively long", "log"); $badlog = 1; - } elsif ($parents < 2 && length($_) > 70) { + } elsif ($parents < 2 && !$revert1 && length($_) > 70) { &complain("Aim for shorter log message summaries", "", -1); } } else { |