Skip to content

Clean and fast way to check if a file is ignored #675

Answered by Byron
Canop asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks for letting me know.

Indeed, it's not exactly easy to use this API right now and it's still young. Despite that, it does what it says on the label and I consider the ignore file handling as correct as I could make it. It definitely lacks documentation about its expectations and when it would panic if they are not met.

There is gix exclude query <path-spec> and its implementation which should serve as authoritative example. All paths provided for use against the index should be considered path specs, and with that there is an API to handle the typical conversions.

An alternative implementation can be found in the test-tools library which doesn't use ref-specs either as it's really o…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by Byron
Comment options

You must be logged in to vote
1 reply
@Byron
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants