Make sure we get full file path for filtering in pr-sanity-check (#100978)

The filename get a `.../` path which makes the next diff not work for files that are too nested.
This can seen in https://github.com/pytorch/pytorch/actions/runs/4920598180/jobs/8789553971?pr=100583 for example where most files are ignored.

The detection properly works after this change.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/100978
Approved by: https://github.com/seemethere
This commit is contained in:
albanD
2023-05-09 18:42:22 +00:00
committed by PyTorch MergeBot
parent 5970fb402e
commit 858657090b

View File

@ -15,7 +15,7 @@ ancestor=$(git merge-base "${BASE}" "${HEAD}")
echo "INFO: Checking aginst the following stats"
(
set -x
git diff --stat "$ancestor" "${HEAD}" | sed '$d' > "${TMPFILE}"
git diff --stat=10000 "$ancestor" "${HEAD}" | sed '$d' > "${TMPFILE}"
)
while read -r git_attribute; do