فهرست منبع

[tools] Max commit title lenght to 72 chars

Romain 5 سال پیش
والد
کامیت
075d097457
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 3 1
      tools/githooks/commit-msg

+ 3 - 1
tools/githooks/commit-msg

@@ -2,11 +2,13 @@
 
 INPUT_FILE=$1
 START_LINE=${2:-`head -n1 $INPUT_FILE`}
-PATTERN="^(HUE\-[a-z0-9]+ \[.+\] .+)|(\[.+\] .+?( \(#[a-z0-9]+\))?|(Merge branch 'master' into .+))|(Revert \".+?\")"
+PATTERN="^.+{0,71}[^.]$"
 
 if ! [[ "$START_LINE" =~ $PATTERN ]]; then
   echo "'$START_LINE' is not a valid commit message, please see for examples:"
   echo ""
+  echo "  50 characters max recommended, 72 is the hard limit"
+  echo ""
   echo "  [hive] Add numExecutors options"
   echo "  [hive] Add numExecutors options (#1000)"
   echo "  HUE-9999 [hive] Use 26000 as default for thrift-over-http"