Background
I have a device that is not working properly starting from Linux Kernel Version 4.12 and above. I want to find out which specific commit caused the issue. My current flow is:
git checkout <commit id> make menuconfig, and recompile make -j32The Problem
While I was going through this tedious process, I found that the compiled kernel version was different (You can also view this via reading the Makefile). However, I do not see version changes via the linux kernel commit log. In fact, after trying git diff <first commit id> <second commit id>, where the second commit id is 1 commit behind the first one according to the linux kernel commit log in step 1, it was found that there are changes that is not reflected on the website.
Question
Why is this going on? How should I properly find out the specific commit that caused an issue on my device?
In order to properly find out which commit caused an issue on your device you should use git bisect. It automates the workflow you have been doing manually. See documentation here.
This command 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 endpoints 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With