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

Re: path limiting broken

From
Linus Torvalds <torvalds@osdl.org>
Date
Apr 17, 2006, 02:48 UTC
Message-ID
<Pine.LNX.4.64.0604161943360.3701@g5.osdl.org>
In-Reply-To
<Pine.LNX.4.63.0604170138470.824@wbgn013.biozentrum.uni-wuerzburg.de>
On Mon, 17 Apr 2006, Johannes Schindelin wrote:
Show 5 quoted lines
> 
> Since quite some time, I wanted to have a way to git-rev-list just the 
> revs between commit1 and commit2, i.e. all commits which are ancestors of 
> commit2, and which have commit1 as ancestor. With this, my task would have 
> been more than simple.
Yes. However, it's not trivial.

In fact, what you want is not what you claim you want. To be useful in general, you have to _also_ handle the case of "commit2" not beign a strict ancestor of "commit1". So what you actually want to do is

 - calculate the merge-head of cmit1 and cmit2 (and if there are multiple, 
   pick some "best" one).
 - pick the shortest path from the merge-head to the cmit1 (and, with a 
   flag, also pick the path from merge-head to cmit2 - sometimes you want 
   to see the whole path from one to the other, sometimes you might want 
   to see just the path from the last common point).

I suspect it ends up being not _that_ different from calculating the bisection point, but I haven't thought it through entirely.

		Linus
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 11 of 13 in “path limiting broken”
  1. Johannes SchindelinApr 16, 2006
  2. Linus TorvaldsApr 16, 2006
  3. Johannes SchindelinApr 16, 2006
  4. Linus TorvaldsApr 16, 2006
  5. Johannes SchindelinApr 16, 2006
  6. Johannes SchindelinApr 16, 2006
  7. Linus TorvaldsApr 16, 2006
  8. Johannes SchindelinApr 16, 2006
  9. Linus TorvaldsApr 16, 2006
  10. Johannes SchindelinApr 16, 2006
  11. Linus TorvaldsApr 17, 2006
  12. Johannes SchindelinApr 16, 2006
  13. Linus TorvaldsApr 16, 2006

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.