diff --git a/tools/check_file_diff_approvals.sh b/tools/check_file_diff_approvals.sh index d9b3bd1ff18a23476e095d1252a42588ad70fb71..3ff8d0f3c6e6bbb3af4dbc55d56a0e5405f1076e 100644 --- a/tools/check_file_diff_approvals.sh +++ b/tools/check_file_diff_approvals.sh @@ -154,9 +154,9 @@ for API_FILE in ${API_FILES[*]}; do done FILTER=`git diff --name-only upstream/develop | grep -v "tools/"` -HAS_CONST_CAST=`git diff -U0 upstream/$BRANCH $FILTER |grep -o -m 1 "const_cast" || true` +HAS_CONST_CAST=`git diff -U0 upstream/$BRANCH $FILTER | grep '^\+' | grep -o -m 1 "const_cast" || true` if [ ${HAS_CONST_CAST} ] && [ "${GIT_PR_ID}" != "" ]; then - echo_line="You must have one RD (XiaoguangHu01,Xreki,luotao1) approval for the usage (either add or delete) of const_cast.\n" + echo_line="You must have one RD (XiaoguangHu01,Xreki,luotao1) approval for the usage of const_cast.\n" check_approval 1 46782768 12538138 6836917 fi