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

[PATCH 0/11] Updated 'quickfetch' series

From
Shawn O. Pearce <spearce@spearce.org>
Date
Nov 9, 2007, 11:06 UTC
Message-ID
<20071109110600.GR14735@spearce.org>

So what started out as a 1 patch hack has now grown into an 11 patch series. *sigh*

  1)  Fix memory leak in traverse_commit_list

This one seems obvious to me. No real harm to not having it but later on we'd see the downside to the leak in git-fetch.

  2)  Reorganize the object memory pools so we can release them
  3)  Define free_all_objects to deallocate object pools
  4)  Allow pooled nodes to be recycled back onto a free list
  5)  Bulk allocate struct commit_list, as we do for struct commit

This part of the series is only lightly tested thus far. It rewrites the object allocators in alloc.c to allow complete destruction of the object hash and its contents in a single call. This way we can rerun the revision machinary a second time in the same process without the mess of clear_commit_flags() or worring about parents having been rewritten.

We also decrease memory usage by moving struct commit_list into the pool of things managed by alloc.c. Given how many of these suckers we are allocating (3x as many as commits in a --topo-order!) the malloc overhead saved per parent pointer is probably worth the pain of reviewing this series.

  6)  git-fetch: Release objects used by a prior transport

Makes use of the above to ensure transports that are called directly in-process (e.g. fetch-pack) don't get confused by a prior invocation of that same transport. I don't think fetch-pack was meant to be run twice in the same process...

  7)  git-fetch: Limit automated tag following to only fetched objects

Rewrites the rules behind automated tag following. The new rule is simpler to understand, has some measure of safety attached to it, and actually works when we turn on quickfetch behavior in a transport.

  8)  run-command: Support sending stderr to /dev/null
  9)  rev-list: Introduce --quiet to avoid /dev/null redirects
 10)  git-fetch: avoid local fetching from alternate (again)
 11)  git-fetch: test avoiding unnecessary copying from alternates

Turn on quickfetch for the native git transport. As I'm sitting here writing this I'm wondering if the quickfetch thing shouldn't be higher up, like in git-fetch itself, so that we can also use it in the HTTP transport. But it should work now with the earlier stuff out of the way.

-- 
Shawn.
Message 1 of 1 in “Updated 'quickfetch' series”
  1. 0/11 Updated 'quickfetch' seriesShawn O. Pearce, Nov 9, 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.