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

Re: two questions about the format of loose object

From
LYLiu Yubao <yubao.liu@gmail.com>
Date
Dec 2, 2008, 02:43 UTC
Message-ID
<4934A0EC.5010600@gmail.com>
In-Reply-To
<20081201152148.GG23984@spearce.org>
Shawn O. Pearce wrote:
Show 10 quoted lines
> Liu Yubao <yubao.liu@gmail.com> wrote:
>> Thanks for your explanation, but I doubt if it's too costly to change the
>> format of loose object, after all this doesn't change the format of pack
>> file and affect git-pull/fetch of old git client. 
> 
> It is too costly; Jakub pointed out the dumb protocol clients
> would have issues with the new format.  Anyone copying a repository
> between machines using scp or a USB memory stick may also run into
> a problem.  Etc.
>  

Yes, exceptional case, is it acceptable that core.uncompressedLooseObject is set to false by default especially for NFS file system?

Show 11 quoted lines
>> Some cons and pros.
>>
>> cons:
>>
>> * old git client can't read loose objects in new format
>>   (People degrade git rarely and old git can read pack files
>>    generated by new git, so it's not a big problem)
> 
> That's a pretty big con.  We can also add slower performance on NFS,
> as has been reported already by others.
>  
I mean to add a format, not to replace the current format of loose object.
Show 14 quoted lines
>> pros:
>>
>> * avoid compressing and uncompressing loose objects that are likely
>>   frequently used when you are coding/merging
> 
> True, loose objects are among the more frequently accessed items.
> 
>> * share loose objects among multipe git processes
> 
> Probably not a huge issue.  How many concurrent git processes are
> you running on the same object store at once?  During development?
> Its probably not more than 1.  So sharing the objects doesn't make
> a very compelling argument.
> 

In my company we have a central server to host source code repository managed by git+ssh. Some collegues also work on the same machine (maybe not a good practice) and set alternates to the central repository, so there can be multiple git processes operating same git object database.

In fact we have a wrapper script of git to make git fit our development process better because git's submodule support isn't good enough. One command in the wrapper script can execute many git commands in a short time.

Show 10 quoted lines
>> * the new code path is simpler although we will have more code paths for
>>   compatibility
> 
> The new code path is more complex, because although one branch is
> very simple (mmap and use) the other code paths have to stay for
> backwards compatibility.  Every time you add a branch point the
> code gets more complex.  It works well enough now, and is at least
> one branch point simpler than what you are proposing.  So I'm not
> really interested in seeing the change made.
> 

Could you review my patches sent just a moment ago? The key changes are rather small.

Best regards,
Liu Yubao
Previous: Shawn O. PearceNext: Liu Yubao
Message 7 of 27 in “two questions about the format of loose object”
  1. Liu YubaoDec 1, 2008
  2. Junio C HamanoDec 1, 2008
  3. Liu YubaoDec 1, 2008
  4. Jakub NarebskiDec 1, 2008
  5. Liu YubaoDec 2, 2008
  6. Shawn O. PearceDec 1, 2008
  7. Liu YubaoDec 2, 2008
  8. 0/5 support reading and writing uncompressed loose objectLiu Yubao, Dec 2, 2008
  9. 1/5 avoid parse_sha1_header() accessing memory out of boundLiu Yubao, Dec 2, 2008
  10. Shawn O. PearceDec 2, 2008
  11. Liu YubaoDec 3, 2008
  12. 2/5 don't die immediately when convert an invalid type nameLiu Yubao, Dec 2, 2008
  13. 3/5 optimize parse_sha1_header() a little by detecting object typeLiu Yubao, Dec 2, 2008
  14. Shawn O. PearceDec 2, 2008
  15. Liu YubaoDec 3, 2008
  16. 4/5 support reading uncompressed loose objectLiu Yubao, Dec 2, 2008
  17. Shawn O. PearceDec 2, 2008
  18. Liu YubaoDec 3, 2008
  19. 5/5 support writing uncompressed loose objectLiu Yubao, Dec 2, 2008
  20. Shawn O. PearceDec 2, 2008
  21. Liu YubaoDec 3, 2008
  22. Liu YubaoDec 2, 2008
  23. Nick AndrewDec 1, 2008
  24. Liu YubaoDec 2, 2008
  25. Shawn O. PearceDec 1, 2008
  26. Liu YubaoDec 2, 2008
  27. Nicolas PitreDec 4, 2008

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.