未验证 提交 7d15db62 编写于 作者: J Jason Simmons 提交者: GitHub

Diff against upstream/master (if available) in the format checker script (#5772)

upstream/master represents the tip of tree in local engine repositories
configured based on https://github.com/flutter/engine/blob/master/CONTRIBUTING.md
上级 d0b8a107
......@@ -32,7 +32,12 @@ $CLANG_FORMAT --version
# Compute the diffs.
FILETYPES="*.c *.cc *.cpp *.h *.m *.mm"
DIFF_OPTS="-U0 --no-color --name-only"
FILES_TO_CHECK="$(git diff $DIFF_OPTS master -- $FILETYPES)"
if git remote get-url upstream >/dev/null 2>&1; then
UPSTREAM=upstream/master
else
UPSTREAM=master
fi;
FILES_TO_CHECK="$(git diff $DIFF_OPTS $UPSTREAM -- $FILETYPES)"
FAILED_CHECKS=0
for f in $FILES_TO_CHECK; do
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册