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

Re: git-rev-list: proper lazy reachability

From
Jon Seymour <jon.seymour@gmail.com>
Date
May 31, 2005, 07:58 UTC
Message-ID
<2cfc4032050531005820979ca7@mail.gmail.com>
In-Reply-To
<Pine.LNX.4.58.0505301847120.1876@ppc970.osdl.org>
On 5/31/05, Linus Torvalds <torvalds@osdl.org> wrote:
> 
> Somebody should probably take a look at my simplistic algorithm, since it
> can probably be improved upon and/or fixed for corner-cases.
Seems reasonable, though I think that in a graph like this:
    A 
  /  |  \ 
B  C  D
|  /   /
E
| \ 
F G
and searching for git-rev-list A ^B

it would actually be better to stop at E (printing A,B,C,D,E), rather than B because the contemporaneously parallel edits C and D and the common base E are relevant to evaluating B since they got merged with B into A from the common starting point E.

In the lingo of my epoch theory, this is searching to the next nearest epoch boundary past B.

My merge-order patch to rev-list which incorporates epoch theory is still on its way - it turned out that incrementally finding epoch boundaries was not quite as simple as I thought it would be. I expect I'll have a respectable looking patch available this weekend. The patch I have now works quite well for smaller graphs but fails on larger graphs because it relies on rational numbers with large numerators and denominators and these end up overflowing even 64 bit integers. I think I know how to fix it, but it will take me a few more days yet.

jon.
-- 
homepage: http://www.zeta.org.au/~jon/
blog: http://orwelliantremors.blogspot.com/
Previous: Linus TorvaldsNext: Linus Torvalds
Message 2 of 16 in “git-rev-list: proper lazy reachability”
  1. Linus TorvaldsMay 31, 2005
  2. Jon SeymourMay 31, 2005
  3. Linus TorvaldsMay 31, 2005
  4. Linus TorvaldsMay 31, 2005
  5. Jon SeymourJun 1, 2005
  6. Paul MackerrasMay 31, 2005
  7. Linus TorvaldsMay 31, 2005
  8. Linus TorvaldsMay 31, 2005
  9. Matthias UrlichsJun 1, 2005
  10. Junio C HamanoJun 4, 2005
  11. Thomas GlanzmannJun 4, 2005
  12. Linus TorvaldsJun 4, 2005
  13. Linus TorvaldsJun 4, 2005
  14. Junio C HamanoJun 4, 2005
  15. Petr BaudisJun 4, 2005
  16. Junio C HamanoJun 4, 2005

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.