git-bisect uses a binary search algorithm to find which commit in your project’s history introduced a bug. You use it by first telling it a "bad" commit that is known to contain the bug and a "good" commit that is known to be before the bug was introduced. Then git bisect picks a commit between those two points and asks you whether the selected commit is "good" or "bad". It continues narrowing down the range until it finds the exact commit that introduced the change.

git-scm.com/docs/git-bisect

Follow

@amolith
Would that rely on there being more good commits than bad?

@zachdecook Not necessarily, you're just looking for what specific changes introduced a very specific bug. You test the commits git-bisect suggests, indicate whether or not the bug is present, and that continues until you're left with a single possibility.

Sign in to participate in the conversation
Librem Social

Librem Social is an opt-in public network. Messages are shared under Creative Commons BY-SA 4.0 license terms. Policy.

Stay safe. Please abide by our code of conduct.

(Source code)

image/svg+xml Librem Chat image/svg+xml