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

Re: bisect-helper: we do not bisect --objects

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 3, 2017, 23:51 UTC
Message-ID
<xmqqd1dx7wbl.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<D9E30A61FAC84D3B90981B388C9699D0@PhilipOakley>
"Philip Oakley" <philipoakley@iee.org> writes:
> Bikeshedding: If the given boundary is a tag, it could be tagging a
> blob or tree rather than a commit. Would that be a scenario that
> reaches this part of the code?
I do not think it is relevant.

Bisection is an operation over a "bisectable" commit DAG, where commits can be partitioned into "new" (aka "bad") and "old" (aka "good") camp, all descendants of a "new" commit are all "new", all ancestors of an "old" commit are all "old". Think of the "new"-ness as a 100% inheritable disease that happens spontaneously and without cure. Once you are infected with "new"-ness, all your descendants are forever "new". If you know you are free of the "new"-ness, you know that all your ancestors are not with the "new"-ness, either.

The goal of the operation is to find a "new" commit whose parents are all "old".

The bisectability of the commit DAG is what allows you to say "this commit is new" to a commit somewhere in the middle of the history and avoid having to test any descendants, as they all inherit the "new"-ness from it (similarly when you have one commit that is "old", you do not have to test any ancestor), thereby reducing the number of test from N (all commits in good..bad range) to log(N).

There is no room for a tree or a blob to participate in this graph partitioning problem. A "bad" tree that is "new" cannot infect its children with the "new"-ness and a "good" tree cannot guarantee the lack of "new"-ness of its parents, because a tree or a blob does not have parent or child commits.

Previous: Philip OakleyNext: Philip Oakley
Message 5 of 7 in “bisect-helper: we do not bisect --objects”
  1. Junio C HamanoMar 3, 2017
  2. Christian CouderMar 3, 2017
  3. Junio C HamanoMar 6, 2017
  4. Philip OakleyMar 3, 2017
  5. Junio C HamanoMar 3, 2017
  6. Philip OakleyMar 5, 2017
  7. Junio C HamanoMar 6, 2017

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.