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

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
Previous: Junio C HamanoNext: Mike Hommey
Message 3 of 5 in “Dose git-fetch need --reference option like git-clone?”
  1. Yin PingNov 11, 2007
  2. Junio C HamanoNov 11, 2007
  3. Yin PingNov 11, 2007
  4. Mike HommeyNov 11, 2007
  5. Junio C HamanoNov 11, 2007

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.