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”是什么意思?哈希指的是什么?

4

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

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

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

  • 100644对于文件(blob),
  • 100755对于可执行文件(blob),
  • 040000对于子目录(树),
  • 160000对于子模块(提交),或
  • 120000对于指定符号链接路径的 blob
于 2015-04-24T05:42:10.370 回答