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

Re: Fix archive-destroying "git repack -a -d" bug

From
DJDave Jones <davej@redhat.com>
Date
Sep 18, 2005, 03:18 UTC
Message-ID
<20050918031837.GB23405@redhat.com>
In-Reply-To
<Pine.LNX.4.58.0509171839590.26803@g5.osdl.org>
On Sat, Sep 17, 2005 at 06:46:40PM -0700, Linus Torvalds wrote:
 > 
 > Using "git repack -a -d" can destroy your git archive if you use it twice 
 > in succession.
 > 
 > Why? Because the new pack will be called the same as the old pack. And we 
 > delete the old packs _after_ we've moved the new pack to the .git/objects/ 
 > directory, which means that we'll delete the new pack too!

Hmm, I'm sure I've done this several times in my x86info git repo (http://www.codemonkey.org.uk/projects/x86info/x86info.git)

It seems to look ok to git-fsck-cache though. Would that pick up any breakage if present ?

Running git-whatchanged, the history seems to go all the way back to the beginning of its cvs doppelganger.

		Dave
Previous: Linus TorvaldsNext: Linus Torvalds
Message 2 of 4 in “Fix archive-destroying "git repack -a -d" bug”
  1. Linus TorvaldsSep 18, 2005
  2. Dave JonesSep 18, 2005
  3. Linus TorvaldsSep 18, 2005
  4. Junio C HamanoSep 18, 2005

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.