Make update-netparse-cve use ls-files

This commit is contained in:
Tim Hockin 2023-01-13 21:57:57 -08:00
parent 822745512d
commit 6a49eae422
No known key found for this signature in database

View File

@ -45,22 +45,18 @@ popd >/dev/null
cd "${KUBE_ROOT}" cd "${KUBE_ROOT}"
find_files() { function git_find() {
find . -not \( \ # Similar to find but faster and easier to understand. We want to include
\( \ # modified and untracked files because this might be running against code
-wholename './output' \ # which is not tracked by git yet.
-o -wholename './.git' \ git ls-files -cmo --exclude-standard \
-o -wholename './_output' \ ':!:vendor/*' `# catches vendor/...` \
-o -wholename './_gopath' \ ':!:*/vendor/*' `# catches any subdir/vendor/...` \
-o -wholename './release' \ ':!:third_party/*' `# catches third_party/...` \
-o -wholename './target' \ ':!:*/third_party/*' `# catches third_party/...` \
-o -wholename '*/third_party/*' \ ':(glob)**/*.go' \
-o -wholename '*/vendor/*' \ "$@"
-o -wholename './staging/src/k8s.io/client-go/*vendor/*' \
\) -prune \
\) -name '*.go'
} }
# replace net.ParseIP() and netParseIPCDR # replace net.ParseIP() and netParseIPCDR
find_files | xargs sloppy-netparser git_find -z | xargs -0 sloppy-netparser