1 Star 0 Fork 37

oh-sdu/third_party_nghttp2

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
pre-commit 872 Bytes
一键复制 编辑 原始数据 按行查看 历史
#!/bin/sh -e
#
# An example hook script to verify what is about to be committed.
# Called by "git commit" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
#
CLANGFORMATDIFF=`git config --get clangformatdiff.binary`
if [ -z "$CLANGFORMATDIFF" ]; then
CLANGFORMATDIFF=clang-format-diff.py
fi
errors=`git diff-index --cached --diff-filter=ACMR -p HEAD lib src examples tests | $CLANGFORMATDIFF -p1`
if [ -n "$errors" ]; then
echo "$errors"
echo "--"
echo "[ERROR] We have detected the difference between the code to commit"
echo "and clang-format style rules. Please fix this problem in either:"
echo "1) Apply patch above."
echo "2) Use clang-format to format lines."
echo "3) Reformat these lines manually."
echo "Aborting commit."
exit 1
fi
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/oh-sdu/third_party_nghttp2.git
git@gitee.com:oh-sdu/third_party_nghttp2.git
oh-sdu
third_party_nghttp2
third_party_nghttp2
master

搜索帮助