Skip to content

Commit 15ec576

Browse files
committed
check: Use --text when potentially diffing generated files
The diffs generated from running `tools/check build_runner` were not detected. See comment: #904 (comment) We normally exclude diffs from generated files through our `.gitattributes` configurations. This happens to `git --quiet -- [<path>...]` too. -a/--text allows us to include those files regardless. Signed-off-by: Zixuan James Li <[email protected]>
1 parent d1a2538 commit 15ec576

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/check

+2-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,8 @@ files_check() {
189189
check_no_changes() {
190190
local change_description="$1"; shift
191191

192-
if git diff --quiet -- "$@" \
192+
# To include files excluded in `.gitattributes`, --text is necessary.
193+
if git diff --text --quiet -- "$@" \
193194
&& no_untracked_files "$@"; then
194195
return
195196
fi

0 commit comments

Comments
 (0)