This is a new series I've mentioned earlier today.
[PATCH 1/2] Introduce git-run-with-user-path helper program.
[PATCH 2/2] Add sample ignore logic to git-run-with-user-path command.
The first one adds a path canonicalization helper with path
ignore hooks but no ignore logic implementation (it passes
everything that passes verify_path()). The second one adds a
sample ignore logic implementation using PCRE.
Although the second one is done primarily as an example and to
start a mailing list discussion, it should be also safe to merge
if you decide to take patch 1, because the logic is used only by
git-run-with-user-path which is a new program. no Porcelain uses
right now.