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

Re: [PATCH] First cut at libifying revlist generation

From
Junio C Hamano <junkio@cox.net>
Date
Feb 27, 2006, 05:09 UTC
Message-ID
<7vy7zx1j6u.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.64.0602261914270.22647@g5.osdl.org>
Linus Torvalds <torvalds@osdl.org> writes:
Show 9 quoted lines
> On Sun, 26 Feb 2006, Junio C Hamano wrote:
>> 
>> I am clueless about the "limited = (list && list->next)" part,
>> but there is only one commit involved hence the test is false
>> with my testcase "git-rev-list --objects v1.0.0^0..v1.0.0"; I
>> think the old code said dotdot is a limited case.
>
> dotdot should insert _two_ commits onto the list - the positive and 
> the negative one.  Doesn't it? 

Not really, because the second invocation of add_one_commit() says "I've seen that *commit*", which is correct. And the story is obviously the same if you used longhand "^v1.0.0^0 v1.0.0".

As a symbolic notation v1.0.0^0..v1.0.0 may not make much sense, but the point is "the other end says he has that commit object, but now he wants the tag we later attached to that commit object; let's list the objects we need to send him". This is what upload-pack does.

A bad consequence of not limiting is that:
	git-rev-list ^v1.0.0^0 v1.0.0 | tail -n 1
gives this commit ;-):
	e83c5163316f89bfbde7d9ab23ca2e25604af290
Argh.
Previous: Linus TorvaldsNext: Linus Torvalds
Message 7 of 12 in “First cut at libifying revlist generation”
  1. First cut at libifying revlist generationLinus Torvalds, Feb 26, 2006
  2. Junio C HamanoFeb 26, 2006
  3. Johannes SchindelinFeb 27, 2006
  4. Linus TorvaldsFeb 27, 2006
  5. Junio C HamanoFeb 27, 2006
  6. Linus TorvaldsFeb 27, 2006
  7. Junio C HamanoFeb 27, 2006
  8. Linus TorvaldsFeb 27, 2006
  9. Linus TorvaldsFeb 27, 2006
  10. Junio C HamanoFeb 27, 2006
  11. Johannes SchindelinFeb 27, 2006
  12. Junio C HamanoFeb 28, 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.