Re: Dose git-fetch need --reference option like git-clone?
- From
Yin Ping <pkufranky@gmail.com>
- Date
- Nov 11, 2007, 11:38 UTC
- Message-ID
- <46dff0320711110338t74d654a3h8811ae9d22f25870@mail.gmail.com>
- In-Reply-To
- <7vsl3dgovv.fsf@gitster.siamese.dyndns.org>
On Nov 11, 2007 4:36 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 15 quoted lines
> > No, there is no such thing. > > I think what you are talking about is a reasonable thing to > want. It would have been easier to hack in back when git-fetch > was a script, but now you would need to work a bit harder in the > C code. On the other hand, however, I suspect the resulting > code would be cleaner without having to actually create and > delete temporary refs in refs/reference-tmp/ namespace but fake > them only in-core, with a proper transport API enhancements. > > But if you only want a quick-and-dirty workaround, you can > manually do refs/reference-tmp and objects/info/alternates dance > that is done by git-clone before running a git-fetch from such > "nearby" remote.
Now my workaround is $ git remote add remoteA path/to/remoteACloned $ git fetch remoteA Then update .git/config to let remote.remoteA.url=git://remoteAUrl $ git fetch
-- Ping Yin