Search code examples
gitgit-bisect

What does the last line of git bisect output mean?


I just ran a Git bisect and got the following output:

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

I understand everything except the:

040000 040000 b1ed63b681bd41f924cbcf8214d65b65d7c2ea48 958a44d35851dae34b62d198a6b7f5685f490c89 M   src 

What does "040000" mean? What do the hashes refer to?


Solution

  • This is about the path parameter within the first bad commit which has changes triggering the error.

    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

    You can see more in "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
    

    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.

    In your case, "040000" is a file mode, one of:

    • 100644 for file (blob),
    • 100755 for executable (blob),
    • 040000 for subdirectory (tree),
    • 160000 for submodule (commit), or
    • 120000 for a blob that specifies the path of a symlink