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

Re: [PATCH 2/4] revision traversal: retire BOUNDARY_SHOW

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Mar 6, 2007, 15:52 UTC
Message-ID
<Pine.LNX.4.63.0703061643490.22628@wbgn013.biozentrum.uni-wuerzburg.de>
In-Reply-To
<7vd53mppvb.fsf@assigned-by-dhcp.cox.net>
Hi,
On Tue, 6 Mar 2007, Junio C Hamano wrote:
Show 22 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 
> >> > This should help performance, as not all reachable commits are 
> >> > traversed any more.
> >> 
> >> You prevented that with "while (i &&" part already, didn't you?
> >
> > Well, yes. I also wanted to prevent going down all paths, though.
> 
> If we wanted to bundle "-8 A B", I think we would make 'x' and
> 'y' prereqs, as they are the direct parents commits that are
> shown, and that themselves are not shown.
> 
>          .---*---*---*---*---* A
>         /
>     ---x---y---*---*---* B
> 
> If we say upon hitting prereq (x and y) we stop traversal by
> marking the parent UNINTERESTING, I suspected that we may not
> find out 'x' with get_revision() loop, and that was why I chose
> not to.  Instead the loop stops by finding y and then x (and by
> saying "ok I needed to find two and now I have two".
Yes, that is correct. What I wanted to optimize for was this:
x--*--*--A
y--*--B

There is no need to traverse the parents of y to find x. I wanted for the traversal to just stop on paths where a prereq was found.

But setting the parents to UNINTERESTING or SHOWN was wrong, because that would not stop the traversal: see get_revision_1(). In case revs->limited is 0, and the cutoff date is not yet reached, the parents are added always. Even if the current commit is UNINTERESTING or SHOWN. (Which is correct, of course.)

BTW this behaviour with revs->limited = 1 made me set revs->limited in case of revs->reverse in the first place...

Ciao, Dscho

Previous: Junio C HamanoNext: Junio C Hamano
Message 22 of 26 in “[BUG] git-rev-list: --topo-order --boundary and --max-count”
  1. Santi BéjarMar 5, 2007
  2. Junio C HamanoMar 5, 2007
  3. Junio C HamanoMar 5, 2007
  4. Linus TorvaldsMar 5, 2007
  5. revision walker: Fix --boundary when limitedJohannes Schindelin, Mar 5, 2007
  6. Johannes SchindelinMar 5, 2007
  7. Linus TorvaldsMar 5, 2007
  8. Linus TorvaldsMar 5, 2007
  9. Junio C HamanoMar 5, 2007
  10. Johannes SchindelinMar 6, 2007
  11. Junio C HamanoMar 6, 2007
  12. Johannes SchindelinMar 6, 2007
  13. Junio C HamanoMar 6, 2007
  14. Johannes SchindelinMar 5, 2007
  15. Junio C HamanoMar 6, 2007
  16. 2/4 revision traversal: retire BOUNDARY_SHOWJunio C Hamano, Mar 6, 2007
  17. Johannes SchindelinMar 6, 2007
  18. Junio C HamanoMar 6, 2007
  19. SHOWN means shownJunio C Hamano, Mar 6, 2007
  20. Johannes SchindelinMar 6, 2007
  21. Junio C HamanoMar 6, 2007
  22. Johannes SchindelinMar 6, 2007
  23. 3/4 git-bundle: various fixupsJunio C Hamano, Mar 6, 2007
  24. Johannes SchindelinMar 6, 2007
  25. 4/4 git-bundle: --list-prereqsJunio C Hamano, Mar 6, 2007
  26. Junio C HamanoMar 5, 2007

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.