Git无效的修订范围Symfony2作曲家外部捆绑包 [英] Git Invalid revision range Symfony2 composer external bundle
问题描述
[RuntimeException]
Failed to execute git log 18efcf67d236d5bbf46ac67820250dffd0474b6e..94e2146f525fa1367e15646fa273e5b34f921e68 --pretty=format:"%h - %an: %s"
fatal: Invalid revision range 18efcf67d236d5bbf46ac67820250dffd0474b6e..94e2146f525fa1367e15646fa273e5b34f921e68
当我创建了一个自定义的外部Symfony2捆绑包并偶然发生此错误时用0.1标记它,然后将其更改为1.0.0。 (我还已将父项目的 composer.json
从: bundle / mycustombundle: 0.1。 更改为
bundle / mycustombundle: 1.0。
来容纳这个)。
I had this error when I created a custom external Symfony2 bundle and accidentally tagged it with 0.1 and then changed it to 1.0.0. (I had also changed the parent project's composer.json
from: "bundle/mycustombundle": "0.1."
to "bundle/mycustombundle": "1.0."
to accommodate this).
推荐答案
我相信问题在于,当我尝试更新至1.0.1时,它已经与标签混淆了(三位数字1.0.1不能正确地跟随两位数的0.1标签)。
I believe the problem was that it had become confused with the tags when I was trying to update to 1.0.1 (the three digit 1.0.1 doesn't follow on properly from the two digit 0.1 tag).
要解决此问题,我:
- 手动删除
mycustombundle 来自
myparentsymfonyproject / vendors / bundle / mycustombundle
的code> - 删除了
composer.lock
myparentsymfonyproject
中的code>文件是 - 进行了
编写器安装-vvv- -prefer-source
(此操作创建了正确的composer.lock
文件(-prefer-source
w使用已经存在的文件夹进行恶意安装,而不是重新下载所有文件夹)
mycustombundle
回购) - Manually deleted
mycustombundle
frommyparentsymfonyproject/vendors/bundle/mycustombundle
- Deleted the
composer.lock
file frommyparentsymfonyproject
- Did a
composer update -vvv bundle/mycustombundle
(this downloaded the correctly taggedmycustombundle
repo) - Did a
composer install -vvv --prefer-source
(this created a correctcomposer.lock
file (--prefer-source
will install using the folders that already exist instead of re-downloading them all)
通过清除该漏洞可能有更简单的方法某种形式的作曲家缓存,但这对我有用。
There might be an easier way to fix it by clearing some form of composer cache, but this worked for me.
这篇关于Git无效的修订范围Symfony2作曲家外部捆绑包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!