Create diff patch for a composer package

佐手、 提交于 2019-12-25 00:22:52

问题


I'm contributing to quite a large project with lots of submodules, and using repositories section of composer.json etc. Sometimes it is handy to edit files in the vendor directory instead of the real repository (e.g. there are some submodules with tests for the other ones).

Then I use composer update and a message pops up: Discard changes [y,n,v,d,s,?]?

I can choose the option d, thus getting a nice diff patch I can later use for the real Git repository. Can I have such a patch in a simpler way?


回答1:


You can go to dependency directory and use git to show diff:

cd vendor/somevendor/somepackage
git diff HEAD

This is what Composer is actually doing.



来源:https://stackoverflow.com/questions/50887978/create-diff-patch-for-a-composer-package

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!