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

Re: [PATCH] Skip writing out sha1 files for objects in packed git.

From
Junio C Hamano <junkio@cox.net>
Date
Jun 28, 2005, 03:33 UTC
Message-ID
<7vekanyx33.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.58.0506271935260.19755@ppc970.osdl.org>
>>>>> "LT" == Linus Torvalds <torvalds@osdl.org> writes:

LT> If we want to expand a packed file and really write the objects to the LT> .git/objects directories, we should just not have that packed file in the LT> .git/objects/pack directory.

What I was aiming for was this:
 (1) Introduce an interface to sha1_file.c that lets you say
     "use this file as one of the packs, although it is not
     under .git/objects/pack";
 (2) Introduce another interface to sha1_file.c that lets you
     enumerate the index entries for a given pack file.
 (3) Remove the unpacking logic from unpack-object.c; instead
     call the above interfaces to register the pack and
     enumerate entries, and call read_sha1_file() followed by
     write_sha1_file() with do_expand repeatedly.

However, the infrastructure (1) and (2) may end up being a special case only to support unpack-object (and removing the code duplication for unpacking), in which case what you suggest would make more sense.

LT> And if we have a pack-file in .git/objects/ that already has LT> the object, that may not be the _same_ pack-file that we're LT> expanding at all, so if that pack file already has the LT> object, then not writing it out is actually the right thing LT> to do.

This I have to think about a bit.
Previous: Linus TorvaldsNext: Linus Torvalds
Message 16 of 38 in “CAREFUL! No more delta object support!”
  1. Linus TorvaldsJun 28, 2005
  2. Christopher LiJun 27, 2005
  3. Linus TorvaldsJun 28, 2005
  4. Junio C HamanoJun 28, 2005
  5. Christopher LiJun 28, 2005
  6. Petr BaudisJun 28, 2005
  7. Benjamin LaHaiseJun 28, 2005
  8. Petr BaudisJun 28, 2005
  9. Jan HarkesJun 28, 2005
  10. Christopher LiJun 28, 2005
  11. Linus TorvaldsJun 28, 2005
  12. Emit base objects of a delta chain when the delta is output.Junio C Hamano, Jun 29, 2005
  13. Junio C HamanoJun 28, 2005
  14. Skip writing out sha1 files for objects in packed git.Junio C Hamano, Jun 28, 2005
  15. Linus TorvaldsJun 28, 2005
  16. Junio C HamanoJun 28, 2005
  17. Linus TorvaldsJun 28, 2005
  18. Linus TorvaldsJun 28, 2005
  19. Junio C HamanoJun 28, 2005
  20. Adjust to git-init-db creating $GIT_OBJECT_DIRECTORY/packJunio C Hamano, Jun 28, 2005
  21. Linus TorvaldsJun 28, 2005
  22. Daniel BarkalowJun 28, 2005
  23. Linus TorvaldsJun 28, 2005
  24. Linus TorvaldsJun 28, 2005
  25. Daniel BarkalowJun 28, 2005
  26. Linus TorvaldsJun 28, 2005
  27. Linus TorvaldsJun 28, 2005
  28. Matthias UrlichsJun 28, 2005
  29. Matthias UrlichsJun 28, 2005
  30. Daniel BarkalowJun 28, 2005
  31. Linus TorvaldsJun 29, 2005
  32. Linus TorvaldsJun 29, 2005
  33. Daniel BarkalowJun 29, 2005
  34. Linus TorvaldsJun 29, 2005
  35. Daniel BarkalowJun 29, 2005
  36. Adjust fsck-cache to packed GIT and alternate object pool.Junio C Hamano, Jun 28, 2005
  37. Expose packed_git and alt_odb.Junio C Hamano, Jun 28, 2005
  38. 3/3 Update fsck-cache (take 2)Junio C Hamano, Jun 28, 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.