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

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

From
Linus Torvalds <torvalds@osdl.org>
Date
Jun 25, 2006, 17:29 UTC
Message-ID
<Pine.LNX.4.64.0606251025100.3747@g5.osdl.org>
In-Reply-To
<Pine.LNX.4.63.0606251122260.29667@wbgn013.biozentrum.uni-wuerzburg.de>
On Sun, 25 Jun 2006, Johannes Schindelin wrote:
Show 9 quoted lines
> 
> On Sat, 24 Jun 2006, Linus Torvalds wrote:
> 
> > However, the more worrisome thing about background repacking is that while 
> > it should be safe against normal users, if you have two _repacks_ at the 
> > same time, they can decide to remove each others packs. Yeah, yeah, that's 
> > pretty damn unlikely, but hey, "pretty damn unlikely" is not "impossible".
> 
> Why not introduce a lock file for repack?

You can do that. The problem is, lock-files are really hard to do right, and portably. Especially from scripts.

But _I_ think the basic issue is that it's wrong to even try to do this background repack.

Git does explicit repacking. That's just how it is. If the worry is that people forget to pack often enough, why not just have the "git pull" script _tell_ the user, something like

	if [lots of unpacked objects]; then
		echo "You've got a boatload of unpacked objects now."
		echo "Maybe you'd like to repack using"
		echo "   git repack -a -d"
		echo "Thank you for not smoking"
	fi >&2
which is educational on so many levels.
		Linus
Previous: Johannes Schindelin
Message 7 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.