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

Re: optimising a push by fetching objects from nearby repos

From
Junio C Hamano <gitster@pobox.com>
Date
May 10, 2014, 21:02 UTC
Message-ID
<xmqqtx8xuz3b.fsf@gitster.dls.corp.google.com>
In-Reply-To
<536E2C19.3000202@gmail.com>
Sitaram Chamarty <sitaramc@gmail.com> writes:
Show 10 quoted lines
> Is there a trick to optimising a push by telling the receiver to pick up
> missing objects from some other repo on its own server, to cut down even
> more on network traffic?
>
> So, hypothetically,
>
>     git push user@host:repo1 --look-for-objects-in=repo2
>
> I'm aware of the alternates mechanism, but that makes the dependency on
> the other repo sort-of permanent.
In the direction of fetching, this may be give a good starting point.
    http://thread.gmane.org/gmane.comp.version-control.git/243918/focus=245397
In the direction of pushing, theoretically you could:
 - define a new capability "look-for-objects-in" to pass the name of
   the repository from "git push" to the "receive-pack";
 - have "receive-pack" temporarily borrow from the named repository
   (if the policy on the server side allows it), and accept the push;
 - repack in order to dissociate the receiving repository from the
   other repository it temporarily borrowed from.

which would be the natural inverse of the approach suggested in the "Can I borrow just temporarily while cloning?" thread.

But I haven't thought things through with respect to what else need to be modified to make sure this does not have adverse interaction with simultaneous pushes into the same repository, which would make it harder to solve for "receive-pack" than for "clone/fetch".

Previous: brian m. carlsonNext: Sitaram Chamarty
Message 6 of 13 in “optimising a push by fetching objects from nearby repos”
  1. Sitaram ChamartyMay 10, 2014
  2. Duy NguyenMay 10, 2014
  3. brian m. carlsonMay 10, 2014
  4. milkiMay 10, 2014
  5. brian m. carlsonMay 10, 2014
  6. Junio C HamanoMay 10, 2014
  7. Sitaram ChamartyMay 11, 2014
  8. Storm-Olsen, MariusMay 11, 2014
  9. Sitaram ChamartyMay 11, 2014
  10. Storm-Olsen, MariusMay 11, 2014
  11. Sitaram ChamartyMay 11, 2014
  12. Junio C HamanoMay 11, 2014
  13. Sitaram ChamartyMay 12, 2014

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.