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

Re: optimising a push by fetching objects from nearby repos

From
Sitaram Chamarty <sitaramc@gmail.com>
Date
May 11, 2014, 02:10 UTC
Message-ID
<536EDC1C.5040101@gmail.com>
In-Reply-To
<1399772049733.13154@student.bi.no>
On 05/11/2014 07:04 AM, Storm-Olsen, Marius wrote:
Show 22 quoted lines
> On 5/10/2014 8:04 PM, Sitaram Chamarty wrote:
>> On 05/11/2014 02:32 AM, Junio C Hamano wrote: That's an interesting
>> thread and it's recent too.  However, it's about clone (though the
>> intro email mentions other commands also).
>>
>> I'm specifically interested in push efficiency right now.  When you
>> "fork" someone's repo to your own space, and you push your fork to
>> the same server, it ought to be able to get most of the common
>> objects from disk (specifically, from the repo you forked), and only
>> what extra you did from the network.
>>
> ...
>>
>> I do have a way to do this in gitolite (haven't coded it yet; just
>> thinking).  Gitolite lets you specify something to do before
>> git-*-pack runs, and I was planning something like this:
>
> And here you're poking the stick at the real solution to your problem.
>
> Many of the Git repo managers will neatly set up a server-side repo
> clone for you, with alternates into the original repo saving both
> network and disk I/O.

Gitolite already has a "fork" command that does that (though it uses "-l", not alternates). I specifically don't want to use alternates, and I also specifically am looking for something that activates on a push -- in the situations I am looking to optimise, the clone already happened.

Show 7 quoted lines
> So your work flow would instead be:
>     1. Fork repo on server
>     2. Remotely clone your own forked repo
>
> I think it's more appropriate to handle this higher level operation
> within the security context of a git repo manager, rather than directly
> in git.

Yes, because of the "read access" check in my suggested procedure to handle this. (Otherwise this is as valid as the plan suggested for clone in Junior's email in [1]).

[1]: http://thread.gmane.org/gmane.comp.version-control.git/243918/focus=245397

I will certainly be doing this in gitolite. The point of my post was to validate the flow with the *git* experts in case they catch something I missed, not to say "this should be done *in* git".

Previous: Storm-Olsen, MariusNext: Storm-Olsen, Marius
Message 9 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.