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

Re: [PATCH] Continue traversal when rev-list --unpacked finds a packed commit.

From
Jan Harkes <jaharkes@cs.cmu.edu>
Date
Oct 31, 2006, 02:17 UTC
Message-ID
<20061031021739.GH3617@delft.aura.cs.cmu.edu>
In-Reply-To
<7vk62hs1ct.fsf@assigned-by-dhcp.cox.net>
On Mon, Oct 30, 2006 at 05:47:14PM -0800, Junio C Hamano wrote:
Show 14 quoted lines
> Jan Harkes <jaharkes@cs.cmu.edu> writes:
> 
> > When getting the list of all unpacked objects by walking the commit history,
> > we would stop traversal whenever we hit a packed commit. However the fact
> > that we found a packed commit does not guarantee that all previous commits
> > are also packed. As a result the commit walkers did not show all reachable
> > unpacked objects.
> >
> > Signed-off-by: Jan Harkes <jaharkes@cs.cmu.edu>
> 
> Thanks.
> 
> With this, I think revs->unpacked should not mean "limited", so
> I suspect this is also needed, no?

I'm not familiar enough with the code to know for sure, but my gut feeling is that that would be needed. Let me check...

When that flag is set, the code calls limit_list, which no longer stops traversal when we hit a packed commit. So we end up with a list of all commits in memory. If the flag is not set, the list is kept minimal and parents are only traversed as they are encountered.

So it looks like not setting the flag reduces memory usage we traverse all parents in both cases. Yes, you are correct.

Jan
Previous: Junio C HamanoNext: Junio C Hamano
Message 14 of 17 in “Only repack active packs by skipping over kept packs.”
  1. 2/3 Only repack active packs by skipping over kept packs.Shawn Pearce, Oct 29, 2006
  2. WARNING: THIS PATCH CAN BREAK YOUR REPO, was Re: [PATCH 2/3] Only repack active packs by skipping over kept packs.Nicolas Pitre, Oct 30, 2006
  3. Shawn PearceOct 30, 2006
  4. Shawn PearceOct 30, 2006
  5. Jan HarkesOct 30, 2006
  6. Jan HarkesOct 30, 2006
  7. Shawn PearceOct 30, 2006
  8. Junio C HamanoOct 30, 2006
  9. Junio C HamanoOct 30, 2006
  10. Jan HarkesOct 30, 2006
  11. Junio C HamanoOct 30, 2006
  12. Continue traversal when rev-list --unpacked finds a packed commit.Jan Harkes, Oct 31, 2006
  13. Junio C HamanoOct 31, 2006
  14. Jan HarkesOct 31, 2006
  15. Junio C HamanoOct 30, 2006
  16. Shawn PearceOct 30, 2006
  17. Junio C HamanoOct 30, 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.