Add public API for pathspec matching
This adds a new public API for compiling pathspecs and matching them against the working directory, the index, or a tree from the repository. This also reworks the pathspec internals to allow the sharing of code between the existing internal usage of pathspec matching and the new external API. While this is working and the new API is ready for discussion, I think there is still an incorrect behavior in which patterns are always matched against the full path of an entry without taking the subdirectories into account (so "s*" will match "subdir/file" even though it wouldn't with core Git). Further enhancements are coming, but this was a good place to take a functional snapshot.
Showing
include/git2/pathspec.h
0 → 100644
This diff is collapsed.
Click to expand it.
tests-clar/repo/pathspec.c
0 → 100644
This diff is collapsed.
Click to expand it.
Please
register
or
sign in
to comment