You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by mp...@apache.org on 2016/04/07 01:08:45 UTC

mesos git commit: Fixed commit message hook to not lint the diff in verbose mode.

Repository: mesos
Updated Branches:
  refs/heads/master f4207d4b1 -> 5442cad09


Fixed commit message hook to not lint the diff in verbose mode.

Review: https://reviews.apache.org/r/45839


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/5442cad0
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/5442cad0
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/5442cad0

Branch: refs/heads/master
Commit: 5442cad0900c60d68c98ae6ad69a2fee150d3da6
Parents: f4207d4
Author: Michael Park <mp...@apache.org>
Authored: Wed Apr 6 14:45:07 2016 -0700
Committer: Michael Park <mp...@apache.org>
Committed: Wed Apr 6 16:07:32 2016 -0700

----------------------------------------------------------------------
 support/hooks/commit-msg | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/5442cad0/support/hooks/commit-msg
----------------------------------------------------------------------
diff --git a/support/hooks/commit-msg b/support/hooks/commit-msg
index b32ee92..d3f10c8 100755
--- a/support/hooks/commit-msg
+++ b/support/hooks/commit-msg
@@ -17,6 +17,10 @@ FIRST_CHAR=$(echo -n $FIRST_LINE | head -c 1)
 
 while read LINE
 do
+    # In verbose mode, the diff of the commit is included in the commit message.
+    # Since git looks for the following line and skips everything after it,
+    # we also skip everything once this line is observed.
+    if [ "$LINE" = "# ------------------------ >8 ------------------------" ]; then break; fi
     if [ "$(echo -n $LINE | head -c 1)" = "#" ]; then continue; fi
     LENGTH=$(echo $LINE | wc -c)
     if [ "$LENGTH" -gt "73" ]; then