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
Junio C Hamano <junkio@cox.net>
Date
Oct 30, 2006, 22:54 UTC
Message-ID
<7vbqntv2h5.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<7v3b95wjmg.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> writes:
Show 14 quoted lines
> Jan Harkes <jaharkes@cs.cmu.edu> writes:
>
>> 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.
>
> One potential downside of this is that this makes an obscure but
> useful "gitk --unpacked" useless (robs performance).
>
> http://thread.gmane.org/gmane.comp.version-control.git/19197/focus=19207
>
> But other than that, I think it is an Ok change.  The original
> semantics of --unpacked (with or without "pretend as if objects
> in this pack are loose") were, eh, "strange".
I changed my mind.

Even without --unpacked=pretend-this-is-loose nor .keep flag, the original semantics of --unpacked and git repack do not play with each other well. You can have a history where you have a pack in the middle of the history, and would expect "git repack" without -a to make your .git/objects/??/ directories empty but it would not because --unpacked has been defined to mean "stop traversal when we hit a packed commit". That would _not_ corrupt the repository, but is very counter-intuitive.

Unfortunately this is a semantic change in the middle of the road (and it would change the _output_ not just performance of "gitk --unpacked"), but I think it is a semantic change of a good kind.

So I'll take Jan's patch as is. It needs to go all the way down to "maint", since we have --unpacked= there already.

Previous: Junio C HamanoNext: Jan Harkes
Message 9 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.