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

Several git_dir for vendors as example #39

Closed
TheRatG opened this issue Sep 15, 2015 · 3 comments
Closed

Several git_dir for vendors as example #39

TheRatG opened this issue Sep 15, 2015 · 3 comments

Comments

@TheRatG
Copy link
Contributor

TheRatG commented Sep 15, 2015

Hello, thanks a lot for your library.

I often commit changes in my vendor library, is it possible create pre-commit hook for vendor library?

@veewee
Copy link
Contributor

veewee commented Sep 15, 2015

Hello @TheRatG,

The vendor folder is mostly in your .gitignore file. This means that these files won't be available in GIT and the pre-commit hook will not trigger for these files.

At the moment this is the only solution I can think about:
You could add GrumPHP to the composer.json of the vendor package you are commiting to. Next, run another composer install --dev in the vendor package.
This will initialize the git hook and set the grumphp executable to the the vendor package.
Now, the git hook is initialized and when you commit in that specific vendor package, GrumPHP will run its tasks.
A downside however is that your IDE will find some classes at multiple locations.

@igormukhingmailcom
Copy link
Contributor

@TheRatG Please, don't commit your vendors. You will have a lot of headache in future.

@TheRatG
Copy link
Contributor Author

TheRatG commented Sep 16, 2015

@veewee thanks I will try

@TheRatG TheRatG closed this as completed Sep 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants