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

Re: [PATCH] Teach receive-pack how to keep pack files when unpacklooseobjects = 0.

From
Shawn Pearce <spearce@spearce.org>
Date
Oct 31, 2006, 06:39 UTC
Message-ID
<20061031063941.GB7375@spearce.org>
In-Reply-To
<7v7iyhrsoi.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> wrote:
Show 18 quoted lines
> Nicolas Pitre <nico@cam.org> writes:
> 
> > Why not just parse the pack header in receive-pack / fetch-pack, and 
> > decide on the first-hand information?  Sure the pack header is then 
> > gone, but then the only thing that is needed is an extra flag to both 
> > unpack-objects and index-pack to tell them that we've already parsed the 
> > pack header and that the pack version is x and the number of objects is 
> > y.  Simply something like --pack_header=x,y.  No protocol extension 
> > needed, no extra rev-list, no reliance on the remote server providing 
> > the needed info.
> 
> I like it.
> 
> Because that approach assumes recieve-pack and unpack-objects
> and index-pack are from the same vintage (otherwise your
> receive-pack would need to have a way to see if unpack-objects
> and index-pack would grok --pack_header argument), we could even
> get away without passing the pack version if we wanted to.

Heh. On Saturday I almost did exactly what Nico proposes above. But I thought both of you would find the --pack_header=x,y option too brittle and would reject the change.

But since all three of us liked the same idea I'll code it up and resend my receive-pack patch using Nico's suggestion instead. Hopefully I'll get it out tomorrow.

BTW I think we do need to pass the pack version in the option. If we ever do increment the pack version its going to be after this option is introduced so supporting the option does not imply that the callee is able to parse the pack file without knowing what version the file is, especially if the callee supports both the current version and the new version.

Previous: Junio C HamanoNext: Junio C Hamano
Message 7 of 9 in “Teach receive-pack how to keep pack files when unpacklooseobjects = 0.”
  1. Teach receive-pack how to keep pack files when unpacklooseobjects = 0.Shawn Pearce, Oct 30, 2006
  2. Junio C HamanoOct 30, 2006
  3. Shawn PearceOct 31, 2006
  4. Junio C HamanoOct 30, 2006
  5. Nicolas PitreOct 31, 2006
  6. Junio C HamanoOct 31, 2006
  7. Shawn PearceOct 31, 2006
  8. Junio C HamanoOct 31, 2006
  9. Shawn PearceOct 31, 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.