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

Re: git-rev-list: proper lazy reachability

From
Junio C Hamano <junkio@cox.net>
Date
Jun 4, 2005, 15:01 UTC
Message-ID
<7vekbigo8q.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.58.0505310813540.1876@ppc970.osdl.org>

Linus, what do you think rev-list should do given HEADs from two forks, like this?

    JC          git-rev-list JC LT ????
     |
     |  LT
     |   |
      \ /
       |
       |
       |

The above is often the shape of my working repository. I pull from you, commit a handful on top of your then-HEAD, and when I am about ready to submit, I pull from you again to find your HEAD advanced somewhat.

For patch-form submission, I need a list of my commits since I forked from you. Also I tend to rebase to your head often, instead of merging inside my working repository (which makes later e-mail patch-form submission more work for me), so even when I am not immediately submitting the changes I have in my fork, I need that list to forward port my changes.

JIT currently uses this to get this list (as a workaround):
    git-rev-list JC $(merge-base JC LT)

I am wondering if this "since they forked" is usually what the user wants. If that is the case then it would be great if I did not have to do the "merge-base" part outside.

Current "proper lazy reachability" version, btw, does something very unexpected for my use pattern. If you have more than one commits between the fork point and LT HEAD in the above picture, everything from the beginning of time to JC is given, or something silly like that.

Previous: Matthias UrlichsNext: Thomas Glanzmann
Message 10 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.