git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC] Add bad-branch-first option for git-bisect

From
SHShuang He <shuang.he@intel.com>
Date
Jan 24, 2011, 11:05 UTC
Message-ID
<4D3D5CE5.4050108@intel.com>
In-Reply-To
<4D3D5989.50903@viscovery.net>
On 2011/1/24 18:50, Johannes Sixt wrote:
Show 26 quoted lines
> Am 1/24/2011 11:30, schrieb Shuang He:
>> It's recursively applying bad branch first algorithm, not just constantly
>> stick to first parent.
>> Given this condition:
>>      A ->  B ->  C ->  D ->  E ->  F ->  G ->  H   (master)
>>           \ a  ->  b ->  c ->  d ->  e /  (feature 1)
>>                \ x ->  y ->  z/      (feature 2)
>> start with H as bad commit, and A as good commit, if y is the target bad
>> commit. bad-branch-first algorithm will do it like this:
>>      1. In first round stick to master branch, so it will locate G as first
>> bad commit
>>      2. In second round stick to feature1 branch, then it will locate d as
>> first bad commit
>>      3. In third round stick to feature2 branch, then it will finally
>> locate y as first bad commit
>> So you could see, it's always sticking to branch where current bad commit sit
> Ok, so you explain what your algorithm does.
>
> But you did not illustrate your problem. The history above is ordinary,
> somewhat branchy, has *ONE* commit that introduces a regression, and *NO*
> commit that fixes the regression. But in your rationale you said something
> about "feature1 is fixed just a moment later after feature2 branch is
> created". How does this fit into the picture, where is the problem, and
> how does your algorithm solve it?
>
> -- Hannes
If A is bad commit, and C fixed it, and then F is bad again,
A ->  B ->  C ->  D ->  E ->  F ->  G ->  H   (master)
   \                    \      /
     a  ->  b... c ->  d ->  e->f  (feature 1)
Start with H as bad commit, and D as good commit, it's possible git-bisect would jump to c, and it will lead to wrong direction
If bad-branch-first is used, it would be:
1. first round found F
2. end
Thanks
	--Shuang
Thanks
	--Shuang
Previous: Johannes SixtNext: Junio C Hamano
Message 6 of 14 in “[RFC] Add bad-branch-first option for git-bisect”
  1. Shuang HeJan 24, 2011
  2. add config option core.bisectbadbranchfirstShuang He, Jan 24, 2011
  3. Christian CouderJan 24, 2011
  4. Shuang HeJan 24, 2011
  5. Johannes SixtJan 24, 2011
  6. Shuang HeJan 24, 2011
  7. Junio C HamanoJan 24, 2011
  8. Shuang HeJan 25, 2011
  9. Christian CouderJan 25, 2011
  10. Shuang HeJan 26, 2011
  11. Christian CouderJan 26, 2011
  12. Shuang HeJan 26, 2011
  13. Avery PennarunJan 24, 2011
  14. Shuang HeJan 26, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.