Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for check-ignore #26

Closed
sirnewton01 opened this issue Jul 10, 2018 · 6 comments
Closed

Support for check-ignore #26

sirnewton01 opened this issue Jul 10, 2018 · 6 comments
Assignees
Labels
enhancement git test suite Issues identified by the real git test suite

Comments

@sirnewton01
Copy link
Collaborator

Check ignore is a useful tool to figure out if a file will be ignored or not given the current ignore configuration.

@driusan
Copy link
Owner

driusan commented Jul 11, 2018

(.gitignore and .git/exclude also aren't currently implemented, but check-ignore might be a good way to test the logic before implementing them..)

@driusan
Copy link
Owner

driusan commented Jul 15, 2018

I added https://github.com/driusan/dgit/wiki/Adding-a-git-subcommand if anyone wants to take a stab at this.

@driusan driusan added the git test suite Issues identified by the real git test suite label Jul 15, 2018
@sirnewton01 sirnewton01 self-assigned this Jul 21, 2018
@sirnewton01
Copy link
Collaborator Author

In a previous life I implemented the ignore subsystem for another scm system. I'll see if I can brush the dust off of those skills and use them here.

@driusan
Copy link
Owner

driusan commented Jul 22, 2018

If you're going to look into this, you might want to see if you can replace the globing in #68 with whatever you come up with. (I only implemented the minimal amount I needed to get the test to pass.)

There should probably a some specialized string type to represent patterns, then some methods on that and/or git.File it would be somewhat easier to implement ignores and share the code between other places that need it (like ls-files --exclude-standard)

@sirnewton01
Copy link
Collaborator Author

I made an initial pass on this over the weekend. The changes are in PR #71

@sirnewton01
Copy link
Collaborator Author

The initial implementation is present and covers most of the functionality of check-ignore and the .gitignore format. What remains is the ability to support negation of patterns, which can be covered in another issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement git test suite Issues identified by the real git test suite
Projects
None yet
Development

No branches or pull requests

2 participants