git bisect输出的最后一行是什么意思?

3

我刚刚运行了 Git bisect 命令并得到了以下输出:

547b115c69ab2ac7fde285c9b5653cbd8309a930 is the first bad commit
commit 547b115c69ab2ac7fde285c9b5653cbd8309a930
Author: Václav Slavík <vaclav@slavik.io>
Date:   Sat Mar 14 13:35:32 2015 +0100

    Use a floating tool window for Find

    Keep the window on top of the parent frame at all times, don't show it
    in taskbar and use the small "inspector" window decorations on OS X. The
    latter is what couldn't be accomplished with wxDialog, so change to
    using wxFrame and make the necessary changes.

:040000 040000 b1ed63b681bd41f924cbcf8214d65b65d7c2ea48 958a44d35851dae34b62d198a6b7f5685f490c89 M  src

我理解所有内容,除了“:”后面的部分。
040000 040000 b1ed63b681bd41f924cbcf8214d65b65d7c2ea48 958a44d35851dae34b62d198a6b7f5685f490c89 M   src 

"040000"是一个Git文件夹的模式。这些哈希值是在Git中使用的树对象的SHA-1散列值,代表目录中的每个子项目。
1个回答

3

这是关于第一个有触发错误的更改的路径参数。

如果您知道树中哪个部分涉及到您要跟踪的问题,可以通过指定路径参数来进一步减少试验次数

您可以在 "使用git bisect解决回归问题" 中了解更多信息:

然后像这样进行几个步骤, "git bisect" 最终会找到第一个有问题的提交:

$ git bisect bad
2ddcca36c8bcfa251724fe342c8327451988be0d is the first bad commit
commit 2ddcca36c8bcfa251724fe342c8327451988be0d
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date:   Sat May 3 11:59:44 2008 -0700

    Linux 2.6.26-rc1

:100644 100644 5cf82581... 4492984e... M      Makefile

The hashes are the SHA1 associated with the blob or tree which was passed as a parameter (SHA1 for the good commit vs. SHA for the first bad commit), in order to facilitate a diff.
在这种情况下,“040000”是文件模式之一,包括:
  • 100644表示文件(blob),
  • 100755表示可执行文件(blob),
  • 040000表示子目录(tree),
  • 160000表示子模块(commit),或者
  • 120000表示指定符号链接路径的blob

二分法是在本地副本 https://github.com/vslavik/poedit 存储库上完成的。我使用 git bisect start && git bisect good v1.7.5-oss && git bisect bad 开始了二分法。因此,我期望在最终输出中看到 ce8a284 和 547b115,而不是根本没有引用任何提交的 b1ed63b 和 958a44d。那么 b1ed63b 和 958a44d 是什么? - Alex Henrie
@AlexHenrie:b1ed63b不是commit的索引,而是blobtree的索引。 b1ed63b引用了存储库中的对象(此处为blob),导致测试失败。开头的547b115是第一个错误的提交。请记住,提交引用了树,该树引用其他树或blob(http://www.pointsoftware.ch/wp-content/uploads/2012/07/18333fig0301-tn.png)。在二分输出的末尾,您会看到blob或tree的SHA1,而不是commit。 - VonC

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接