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

Re: WARNING: THIS PATCH CAN BREAK YOUR REPO, was Re: [PATCH 2/3] Only repack active packs by skipping over kept packs.

From
Shawn Pearce <spearce@spearce.org>
Date
Oct 30, 2006, 21:09 UTC
Message-ID
<20061030210908.GB5775@spearce.org>
In-Reply-To
<20061030205200.GA20236@delft.aura.cs.cmu.edu>
Jan Harkes <jaharkes@cs.cmu.edu> wrote:
Show 19 quoted lines
> On Mon, Oct 30, 2006 at 03:26:11PM -0500, Shawn Pearce wrote:
> > Actually the breakage is easier to reproduce without trashing
> > a repository.
> > 
> > Do the above so you have everything in one pack.  Now use rev-list
> > to simulate the object list construction in pack-objects as though
> > we were doing a 'git repack -a -d':
> > 
> >   git-rev-list --objects --all \
> >     --unpacked=.git/objects/pack/pack-*.pack \
> > 	| wc -l
> > 
> > gives me 102 (WRONG WRONG WRONG WRONG!!!!!!)
> 
> The problem seems to be that as soon as we hit something that is found
> in a pack that is not on the ignore list, that object and all it's
> parents are marked as uninteresting. So if the kept pack contains a
> slice of commits (v1.4.3..v1.4.3.3) the revision walker will only return
> the recent stuff (v1.4.3.3..) and drop the older data (..v1.4.3).
Right - I got that far in my own research and then saw your patch
drop into my inbox. :-)
 
> The following patch does fix the problem Nicolas reported, but for some
> reason I'm still getting only 102 objects (only tags and the commits
> they refer to?) with your test.
Ack'd.

Your patch fixes both bugs for me. The rev-list test I talked about above is now turning up 31846 objects which is the correct count. The repack test Nico crafted works correctly too.

Previous: Jan HarkesNext: Junio C Hamano
Message 7 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.