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

Re: [PATCH 09/13] drop objects larger than --blob-limit if specified

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Apr 6, 2007, 15:49 UTC
Message-ID
<Pine.LNX.4.64.0704060845120.6730@woody.linux-foundation.org>
In-Reply-To
<alpine.LFD.0.98.0704052257200.28181@xanadu.home>
On Thu, 5 Apr 2007, Nicolas Pitre wrote:
Show 6 quoted lines
> 
> > (2) Pack the object any way and let the packfile size exceed
> >     my specification.  Ignoring a clear preference from the user
> >     doesn't seem good.
> 
> It is not indeed.
Well, I think there is an easy solution.

Just go back and say that when the user limits the size, it limits the offset at which objects can *start*.

Not only is that the only thing that the index file itself cares about, it also means that

 - you don't ever need to undo anything at all (because you know the 
   starting offset) when you begin packing a new object.
   This should simplify your patch a lot.
 - the object size issue just goes away. Sure, the pack-file limit looks a 
   bit strange (it's no longer a hard limit on the *size* of the 
   pack-file, just on the object offsets), but let's face it, we really 
   really don't care.

And in practice, by setting the pack-file limit to 2GB (or even 1GB), you never ever have to worry about the 32-bit filesystem limits any more, unless your repository is fundamentally so screwed that you simply *cannot* reporesent it well on something like FATFS (ie any object that is 2GB in size will probably have a blob that is even bigger, and FATFS already has problems with it).

So in practice, just limiting the index offsets is what you really want anyway.

		Linus
Previous: Nicolas PitreNext: Dana How
Message 5 of 11 in “drop objects larger than --blob-limit if specified”
  1. 09/13 drop objects larger than --blob-limit if specifiedDana How, Apr 5, 2007
  2. Nicolas PitreApr 6, 2007
  3. Dana HowApr 6, 2007
  4. Nicolas PitreApr 6, 2007
  5. Linus TorvaldsApr 6, 2007
  6. Dana HowApr 6, 2007
  7. Nicolas PitreApr 6, 2007
  8. Linus TorvaldsApr 6, 2007
  9. Junio C HamanoApr 6, 2007
  10. David LangApr 8, 2007
  11. Nicolas PitreApr 6, 2007

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.