-
Notifications
You must be signed in to change notification settings - Fork 428
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
Check files in index/stage instead of working directory #67
Comments
Not sure if that is possible. We will need to do some extra investigation on this issue. |
I have been investigating and I think that is not possible, for example, we are calling to the php-cs-fixer and we need to pass to it the path to the file but we can only get the content of the files in the index using I don't know if there is another approach... |
I'm pretty sure this won't be possible. The git index itself doesn't contain the file changes. It is a binary file containing a sorted list of path names, each with permissions and the SHA1 of a blob object. We will only ever be able to check the working directory files. |
I've discussed the issue with @aderuwe. We also don't think it is possible. The idea is:
|
Now GrumPHP check the index/stage for files changed as desired, but then is check for the content of these files in the working directory, so, you can modify these files locally without adding them to the index (e.g. for commit them) and GrumPHP will pass.
I don't know if is easy or even possible to check for content of the files but in the git index.
The text was updated successfully, but these errors were encountered: