-
Notifications
You must be signed in to change notification settings - Fork 14
Basic filtering of deleted files #132
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
Conversation
… as we call out to `git diff` to get the list of files to process, we can add a `—diff-filter` argument that ignores deleted. This will allow us to skip running our hooks on files that no longer exist. There was some confusion on the last PR as I used the wrong account.
Hello ! Thanks for your contribution :) looks good to me |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe --diff-filter
is the right approach but we probably need to add a test for it? Also, see my comment about --diff-filter=d
being the opposite of what we want IMO.
Thanks for getting the ball rolling!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe --diff-filter
is the right approach but we probably need to add a test for it? Also, see my comment about --diff-filter=d
being the opposite of what we want IMO.
Thanks for getting the ball rolling!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe --diff-filter
is the right approach but we probably need to add a test for it? Also, see my comment about --diff-filter=d
being the opposite of what we want IMO.
Thanks for getting the ball rolling!
@jfb-workhelix Can we get things going? I made https://github.com/jfb-workhelix/mookme/pull/1 to add some tests on top of your changes. |
Add tests for filtering out deleted files
Happy to pull it in and run it. |
OK, it's merged in here, and the tests do complete successfully! Should I open a new PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all looks good to me, thanks for the patch, I look forward to getting rid of this annoying bug 😅
It's up to @LMaxence now, but I don't think it needs a new PR. |
It's fine by me :) Thanks for your contribution ! |
Version 2.5.1 features your change :) Thanks again ! |
… as we call out to
git diff
to get the list of files to process, we can add a—diff-filter
argument that ignores deleted. This will allow us to skip running our hooks on files that no longer exist.There was some confusion on the last PR as I used the wrong account.