cross-posted from: https://programming.dev/post/214031

Have you ever used git bisect? If so, how did you use it? Did it help you find a problem which would otherwise be difficult to find? Story time, I guess?

  • Estinos@lemm.ee
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    I use it regularly in projects from other people, almost never in mines. It’s a good tool when I’m completely in the dark, not knowing much about the architecture of the codebase. When I do know the architecture, I usually have a good intuition where the problem is coming from and I go poke the git log of the file or files related to that, it’s always faster than bisecting. But in Terra Incognita, this is an incredibly powerful tool. You know this version worked, you know this one is broken, and you can just follow the process of git bisect to find the exact commit that introduced it. In FOSS projects, it’s usually a commit that changes two or three lines and you can pinpoint immediately what the problems is. If it’s a 1000 LOC change commit, you’re in for more analysis, but at least you know it’s somewhere there. :) So yeah, I would call that mostly a tool to contribute bugfixes in FOSS projects, at least in my usage.