[clang-format] Optimize processing .clang-format-ignore files (#76733)

Reuse the patterns governing the previous input file being formatted if
the current input file is from the same directory.

NOKEYCHECK=True
GitOrigin-RevId: 42ec976184acd40436acd7104ad715c60ca3e7ed
1 file changed