- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个使用“主干”流的存储库,其中包含 merge 和创建 merge 提交的功能分支,并且我正在使用 bisect 来尝试查找何时引入问题。问题识别过程涉及与已知良好提交的结果进行比较,因此我使用 git bisect --first-parent
(2.29 中的新增功能)跳过不在“主干”分支中的提交(识别导致问题的 merge 提交对我来说就足够了)。
然而,git bisect --first-parent
正在选择没有我作为祖先的第一个良好提交的提交,我不确定这怎么可能。
在下面的例子中,提交 2
好和4
不好。
a
/ \
1-2-3-4
无
--first-parent
,我希望功能分支提交
a
包含在二等分中,但是使用
--first-parent
,我希望它跳过那个提交,只测试 merge 提交,
3
.
first-good
的提交。作为祖先,我正在努力理解为什么。
# both "first-good" and "first-bad" are tags on the "trunk" branch
git bisect start --first-parent
git merge-base --is-ancestor first-good first-bad # returns TRUE
git merge-base first-good first-bad # returns first-good
git checkout first-bad
git bisect bad
git checkout first-good
git bisect good
git merge-base --is-ancestor first-good HEAD # returns FALSE - why/how?
git merge-base first-good HEAD # returns some other commit - why/how?
最佳答案
在 git@47f0f94bc7 中,如果 first-good
提交仅作为 merge 提交的第二个父级存在于主线中,则会观察到问题中描述的行为。考虑到标志的名称,我想这在某种程度上是预料之中的,但是如果您依赖 first-good
提交进行工作构建,确实会导致令人困惑的行为,因为并非所有的二等分都将包含该提交。
例如:
a - b - c # "trunk2"
/ /
1 - 2 # "trunk1"
# 2 is the `first-good` commit
# c is the `first-bad` commit
git bisect --first-parent
将选择
a
作为要测试的提交,即使它不是第一个已知良好提交
2
的祖先。在这种情况下,它似乎回溯到
a
,这是第一个不是
first-good
祖先的提交。它不测试
1
,因为它是
first-good
的祖先,因此可以假设它也很好。
--first-parents
标志的行为是相同的。从
trunk2
开始并 merge 回
first-good
的其他分支将继续被跳过。
关于git - git bisect 如何选择一个没有第一个好的提交作为祖先的提交? (使用 --first-parent),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63608729/
我正在使用 Gunicorn 为 Django 应用程序提供服务,它工作正常,直到我将其超时时间从 30 秒更改为 900000 秒,我不得不这样做,因为我有一个用例需要上传和处理一个巨大的文件(过程
我有一个带有非常基本的管道的Jenkinsfile,它可以旋转docker容器: pipeline { agent { dockerfile { args '-u root' } } stag
在学习 MEAN 堆栈的过程中,我遇到了一个问题。每当我尝试使用 Passport 验证方法时,它都不会返回任何响应。我总是收到“localhost没有发送任何数据。ERR_EMPTY_RESPONS
在当今的大多数企业堆栈中,数据库是我们存储所有秘密的地方。它是安全屋,是待命室,也是用于存储可能非常私密或极具价值的物品的集散地。对于依赖它的数据库管理员、程序员和DevOps团队来说,保护它免受所
是否可以创建像图片上那样的边框?只需使用 css 边框属性。最终结果将是没 Angular 盒子。我不想添加额外的 html 元素。我只想为每个 li 元素添加 css 边框信息。 假设这是一个 ul
我是一名优秀的程序员,十分优秀!