lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 8a71d93 2/5: Ignore lines not part of the com


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 8a71d93 2/5: Ignore lines not part of the commit message in commit hook
Date: Sun, 12 Mar 2017 21:12:54 -0400 (EDT)

branch: master
commit 8a71d93facac50f3edd6eabc8eec530048fc1152
Author: Vadim Zeitlin <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Ignore lines not part of the commit message in commit hook
    
    Don't check the lines of the diff included in the commit message when
    it's being edited if "git commit -v" is used, but not really being part
    of it, as they can easily be longer than 72 characters.
---
 hooks/commit-msg | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hooks/commit-msg b/hooks/commit-msg
index 645959f..7f0f05b 100755
--- a/hooks/commit-msg
+++ b/hooks/commit-msg
@@ -26,6 +26,7 @@ set -e
 sed_script='
 1{/\.$/{s/^.*$/Do not end first line with period/p}}
 2{/^$/!{s/\(^.*$\)/Second line "\1" not empty./p}}
+/^# ------------------------ >8 ------------------------/q
 /.\{73\}/s/\(^.*$\)/"\1" exceeds 72 characters/p
 '
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]