I am trying to use git bisect.
My good commit is
commit 7ce16e99296de1d559e7317adac6bc13a727ae2b
Author: ...
Date: Tue Jun 22 14:52:54 2021 +0800
And my bad commit is
commit 8acb2b2ed0eb1576e7961149bde27cb1568ec39e
Author: ...
Date: Mon Sep 27 13:50:37 2021 +0800
So I think when git bisect starts, it will give me a commit between Jun 22 2021 and Sep 27 2021.
However, it gives me a rather old one
commit 2f3971bcae715839ee8d2aea837a4bf4ce31c815
Merge: 2d32bba 5777bb6
Author: ...
Date: Tue Dec 8 11:25:04 2020 +0800
I think it may be because of some merge issue, but why, and how can I solve this?
It's because the author date of a revision might be older than the time when the revision was brought into the branch. 2 simple scenarios:
that commit was developed in a feature branch a long time ago. It was merged into the branch you are analizing between the two revisions that you are bisecting. In this case, git will notice that the problem is coming from a merge revision between the 2 revisions being bisected and will proceed to follow that branch, hence the older date.
the revision was developed a long time ago... it was cherry-picked (or rebased) into the branch between the 2 revisions you are bisecting. The revision is between the 2 revisions.... but the author date won't be between the 2 dates of the revisions.