From: "Storm-Olsen, Marius" <Marius.Storm-Olsen@student.bi.no>
To: Sitaram Chamarty <sitaramc@gmail.com>,
Junio C Hamano <gitster@pobox.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>,
milki <milki@rescomp.berkeley.edu>
Subject: Re: optimising a push by fetching objects from nearby repos
Date: Sun, 11 May 2014 03:11:57 +0000 [thread overview]
Message-ID: <1399777917522.41294@student.bi.no> (raw)
In-Reply-To: <536EDC1C.5040101@gmail.com>
On 5/10/2014 9:10 PM, Sitaram Chamarty wrote:
> On 05/11/2014 07:04 AM, Storm-Olsen, Marius wrote:
>> On 5/10/2014 8:04 PM, Sitaram Chamarty wrote: 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.
You can probably get the managers to do a fork without alternates too.
Also, it doesn't matter if you have already cloned from the original
repo remotely. If you use the git manager to clone the original repo on
the server, and you push to your new repo, only your changes will go
back over the wire. The git protocol will figure out only which objects
are missing to complete the new HEAD, and send those.
So
1. Clone remote repo
2. Hack hack hack
3. Fork repo on server
4. Push changes to your own remote repo
is equally efficient.
>> 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]).
It's similar, but security issues come into play due to the swapped
direction, which is why I think it's wrong to place it in the push
command. Now, having the 'borrow' complement to 'reference' in Git seems
like a good idea, and should work for your case too, but IMO should be
configured with in the security context of the repo manager, and not on
an individual push. *shrug*
> [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".
Absolutely, and I think that's how everyone perceived it :) It's a good
idea, with some tweaks, I think.
--
.marius
next prev parent reply other threads:[~2014-05-11 3:12 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-10 13:39 optimising a push by fetching objects from nearby repos Sitaram Chamarty
2014-05-10 13:54 ` Duy Nguyen
2014-05-10 17:23 ` brian m. carlson
2014-05-10 17:32 ` milki
2014-05-10 20:04 ` brian m. carlson
2014-05-10 21:02 ` Junio C Hamano
2014-05-11 1:04 ` Sitaram Chamarty
2014-05-11 1:34 ` Storm-Olsen, Marius
2014-05-11 2:10 ` Sitaram Chamarty
2014-05-11 3:11 ` Storm-Olsen, Marius [this message]
2014-05-11 5:21 ` Sitaram Chamarty
2014-05-11 18:04 ` Junio C Hamano
2014-05-12 1:50 ` Sitaram Chamarty
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1399777917522.41294@student.bi.no \
--to=marius.storm-olsen@student.bi.no \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=milki@rescomp.berkeley.edu \
--cc=sitaramc@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).