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

Re: [RFC] git-fetch - repack in the background after fetching

From
Junio C Hamano <junkio@cox.net>
Date
Jun 25, 2006, 03:12 UTC
Message-ID
<7vy7vmormn.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<11511486003924-git-send-email-martin@catalyst.net.nz>
Martin Langhoff <martin@catalyst.net.nz> writes:
> This is a follow up to a similar patch earlier
> http://www.gelato.unsw.edu.au/archives/git/0605/21401.html -- is there 
> interest in making GIT more friendly to users who don't know or care
> about packing and repacking their repos?

I would be a bit worried about the niced background repack racing against another instance of itself spawned by the same parent.

> I loathe to do this conditionally only on the count of unpacked
> objects. If there's a quick'n'dirty way of asking portably whether
> the machine is busy or otherwise resource-constrained (ie: on battery)
> it should use it to avoid running repack at inconvenient times.
count-objects might be lighter weight than rev-list --unpacked.

If you mean to make core.autorepack to be boolean, checking for string 'no' is not the right way.

	git repo-config --bool --get core.autorepack

But it does not matter if that variable is a string that is almost always true unless the value is "no".

Previous: Martin LanghoffNext: Ryan Anderson
Message 2 of 7 in “[RFC] git-fetch - repack in the background after fetching”
  1. Martin LanghoffJun 24, 2006
  2. Junio C HamanoJun 25, 2006
  3. Repack should try to prevent itself from running twice, concurrently.Ryan Anderson, Jun 25, 2006
  4. Johannes SchindelinJun 25, 2006
  5. Linus TorvaldsJun 25, 2006
  6. Johannes SchindelinJun 25, 2006
  7. Linus TorvaldsJun 25, 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.