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

Re: push race

From
Jeff King <peff@peff.net>
Date
Oct 16, 2012, 17:25 UTC
Message-ID
<20121016172502.GC27243@sigill.intra.peff.net>
In-Reply-To
<7vtxtus58h.fsf@alter.siamese.dyndns.org>
On Tue, Oct 16, 2012 at 10:21:02AM -0700, Junio C Hamano wrote:
Show 11 quoted lines
> > I suppose we could do the way unpack-objects does: prefer present
> > objects and drop the new identical ones, no memcmp. Objects that are
> > not bases, or are ref-delta bases, can be safely dropped. ofs-delta
> > bases may lead to rewriting the pack. Do-able but not sure it's worth
> > the effort.
> 
> Until you read all the incoming pack data, you won't know what
> objects are used as bases for others, so unless you are keeping
> everything in core, you would have to spool the incoming data to a
> file and then rewrite the final pack file to "drop" these "can be
> safely dropped" objects, with or without offset delta encoding.

By definition, you know that you have another copy of these objects (that is why you are dropping them). So you could treat later delta references to them the same as thin-pack references, and re-add your existing on-disk copy of the object to the end of the pack.

But still...the complexity is ugly, and we do not even have a measured problem in the real world. This is not worth thinking about. :)

-Peff
Previous: Junio C HamanoNext: Junio C Hamano
Message 17 of 20 in “push race”
  1. Angelo BorsottiOct 15, 2012
  2. Matthieu MoyOct 15, 2012
  3. Nguyen Thai Ngoc DuyOct 15, 2012
  4. Ævar Arnfjörð BjarmasonOct 15, 2012
  5. demerphqOct 15, 2012
  6. Marc BranchaudOct 15, 2012
  7. Angelo BorsottiOct 15, 2012
  8. Jeff KingOct 15, 2012
  9. Jeff KingOct 15, 2012
  10. Shawn PearceOct 16, 2012
  11. Jeff KingOct 16, 2012
  12. Nguyen Thai Ngoc DuyOct 16, 2012
  13. Jeff KingOct 16, 2012
  14. Nguyen Thai Ngoc DuyOct 16, 2012
  15. Jeff KingOct 16, 2012
  16. Junio C HamanoOct 16, 2012
  17. Jeff KingOct 16, 2012
  18. Junio C HamanoOct 16, 2012
  19. Angelo BorsottiOct 16, 2012
  20. Angelo BorsottiOct 15, 2012

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.