On Sat, May 10, 2014 at 07:09:37PM +0530, Sitaram Chamarty wrote: > Hi, > > 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. I'm looking for a temporary > dependence, just for the duration of the push. Naturally, the objects > should be brought into the target repo for that to happen, except that > this would be doing more from disk and less from the network. > > My gut says this isn't possible, and I've searched enough to almost be > sure, but before I give up, I wanted to ask.
I don't believe this is possible. There has been some discussion on related matters at least fairly recently, though. Part of the reason nobody has implemented this is because it exposes additional security concerns. If I create a commit that references an object I don't own, but is in someone else's repository, this feature could allow me to gain access to objects which I shouldn't have access to unless the authentication and permissions layer is very, very careful. This would make many very simple HTTPS and SSH setups much more complex. Alternates don't have this problem because they're done server-side. I definitely understand the desire for this, though. I would probably use it myself if it were available. -- brian m. carlson / brian with sandals: Houston, Texas, US +1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
Description: Digital signature