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

时间:2015-04-24 05:28:40

标签: git git-bisect

我刚刚运行了一个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”是什么意思?哈希指的是什么?

1 个答案:

答案 0 :(得分:3)

这是关于第一个错误提交中的路径参数,它具有触发错误的更改。

  

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

您可以在“Fighting regressions with 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

哈希是与blob或树相关联的SHA1,它作为参数传递(SHA1用于良好提交而SHA用于第一次错误提交),以便于实现差异。

在您的情况下,“040000”是文件模式,其中之一是:

  • 100644代表文件(blob),
  • 100755表示可执行文件(blob),
  • 040000用于子目录(树),
  • 160000用于子模块(提交)或
  • 120000表示指定符号链接路径的blob