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

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

最佳答案

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

You can further cut down the number of trials, if you know what part of the tree is involved in the problem you are tracking down, by specifying path parameters

你可以在“Fighting regressions with git bisect”中看到更多:

And after a few more steps like that, "git bisect" will eventually find a first bad commit:

$ 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 用于指定符号链接(symbolic link)路径的 blob

关于git - git bisect 输出的最后一行是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29839400/

相关文章:

git - 为什么 git-bisect 必须从工作树的顶级目录运行?

git: merge 时如何不删除文件?

git - merge Bitbucket 中的两个分支

git - 在二等分之前将工作树更改为特定提交的最佳方法是什么?

git - 是否可以将 git 提交标记为正在进行的工作?

git bisect 不起作用,没有输出

bash - 从通过 post-receive 钩子(Hook)创建的 ssh session 调用时,导出不起作用

git - 将分支和子分支 merge 回 master

git - 如何将 Git 存储库克隆到特定文件夹中?

git - 是否可以更有针对性地从 git bisect 错误中恢复?