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/06 23:41:04 UTC
[1/2] mesos git commit: Fixed commit message hook to iterate over the
lines rather than words.
Repository: mesos
Updated Branches:
refs/heads/master af6309f1c -> 18f60da86
Fixed commit message hook to iterate over the lines rather than words.
Review: https://reviews.apache.org/r/45767/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/b32a029c
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/b32a029c
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/b32a029c
Branch: refs/heads/master
Commit: b32a029c9d890cd5fe05302c54aaff6c8af826bc
Parents: af6309f
Author: Michael Park <mp...@apache.org>
Authored: Wed Apr 6 14:40:45 2016 -0700
Committer: Michael Park <mp...@apache.org>
Committed: Wed Apr 6 14:40:45 2016 -0700
----------------------------------------------------------------------
support/hooks/commit-msg | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/b32a029c/support/hooks/commit-msg
----------------------------------------------------------------------
diff --git a/support/hooks/commit-msg b/support/hooks/commit-msg
index d3d5415..ccb8f4d 100755
--- a/support/hooks/commit-msg
+++ b/support/hooks/commit-msg
@@ -15,14 +15,14 @@ FIRST_LINE=$(head -n 1 $1)
LAST_CHAR=$(echo -n $FIRST_LINE | tail -c 1)
FIRST_CHAR=$(echo -n $FIRST_LINE | head -c 1)
-for LINE in $COMMIT_MESSAGE
+while read LINE
do
LENGTH=$(echo $LINE | wc -c)
if [ "$LENGTH" -gt "73" ]; then
echo >&2 "Error: No line in the commit message summary may exceed 72 characters."
exit 1
fi
-done
+done <<< "$COMMIT_MESSAGE"
if [[ ! "$FIRST_CHAR" =~ [A-Z] ]]; then
echo >&2 "Error: Commit message summary (the first line) must start with a capital letter."
[2/2] mesos git commit: Fixed commit message hook to skip over the
commented lines.
Posted by mp...@apache.org.
Fixed commit message hook to skip over the commented lines.
Review: https://reviews.apache.org/r/45768/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/18f60da8
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/18f60da8
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/18f60da8
Branch: refs/heads/master
Commit: 18f60da868b07885fc2c29b4494054dd9bc871a6
Parents: b32a029
Author: Michael Park <mp...@apache.org>
Authored: Wed Apr 6 14:40:51 2016 -0700
Committer: Michael Park <mp...@apache.org>
Committed: Wed Apr 6 14:40:51 2016 -0700
----------------------------------------------------------------------
support/hooks/commit-msg | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/18f60da8/support/hooks/commit-msg
----------------------------------------------------------------------
diff --git a/support/hooks/commit-msg b/support/hooks/commit-msg
index ccb8f4d..b32ee92 100755
--- a/support/hooks/commit-msg
+++ b/support/hooks/commit-msg
@@ -17,6 +17,7 @@ FIRST_CHAR=$(echo -n $FIRST_LINE | head -c 1)
while read LINE
do
+ if [ "$(echo -n $LINE | head -c 1)" = "#" ]; then continue; fi
LENGTH=$(echo $LINE | wc -c)
if [ "$LENGTH" -gt "73" ]; then
echo >&2 "Error: No line in the commit message summary may exceed 72 characters."