我怎样才能知道 git bisect 接下来会尝试什么提交?
在某些情况下,在 git bisect 会话期间,测试特定提交需要很长时间(例如,因为我必须构建完整的发布包并将其部署在特别奇怪的机器上)。事实上,测试构建需要很长时间,以至于我想在不知道当前测试是否成功的情况下开始构建接下来的两次提交。这样,我可以通过测试当前版本并并行构建接下来的两个版本来加速平分。
有谁知道让 git bisect 显示接下来的两个修订的技巧,具体取决于当前提交是好还是坏?
In some cases during a git bisect
session, testing a particular commit takes quite long (for instance, because I have to build a full release package and deploy it on a particularly strange machine). In fact, testing a build takes so long that I'd like to start building the next two commits already without knowing whether the current test succeeds or not. That way, I can speed up bisecting by testing the current version and build the next two versions in parallel.
Does anybody know a trick to make git bisect
show the next two revisions, depending on whether the current commit is good or bad?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
git bisect
在内部使用git rev-list --bisect
来找出哪个版本是两个版本之间的中点。您可以自己使用它来基本上重新实现 git bisect 。应该没那么难。git bisect
usesgit rev-list --bisect
internally to find out, which revision is the midpoint between two revisions. You can use it by yourself to basically reimplementgit bisect
. It shouldn't be that hard.Git 2.30(2021 年第一季度)发生了变化:“
git bisect start/next
"(man)在一个很大的历史跨度中花费大量时间试图准确地找到中间点;当我们看到足够接近中间点的提交时,可以通过停止来优化这一点。请参阅 提交 0afcea7(2020 年 11 月 12 日),作者:SZEDER Gábor (
szeder
)。(由 Junio C Hamano --
gitster
-- 合并于 提交 2557c11,2020 年 11 月 25 日)That has changed with Git 2.30 (Q1 2021): "
git bisect start/next
"(man) in a large span of history spends a lot of time trying to come up with exactly the half-way point; this can be optimized by stopping when we see a commit that is close enough to the half-way point.See commit 0afcea7 (12 Nov 2020) by SZEDER Gábor (
szeder
).(Merged by Junio C Hamano --
gitster
-- in commit 2557c11, 25 Nov 2020)