git-format-staged
git-format-staged copied to clipboard
Why use fnmatch to match absolute paths instead of relative path?
I am not familiar with system programming. And I want to rewrite the tool in Rust. I am confused, why just
fnmatch(entry['src_path'], pattern)
instead of
fnmatch(normalize_path(entry['src_path'], relative_to=git_root), normalize_path(pattern))