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

Re: [PATCH] add --remote option to git-clone.

From
Junio C Hamano <junkio@cox.net>
Date
Feb 3, 2007, 09:27 UTC
Message-ID
<7v64aj7frr.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<eq1j8i$rtv$1@sea.gmane.org>
Jakub Narebski <jnareb@gmail.com> writes:
Show 9 quoted lines
>> I did not find anything MS'esque in what MST did in his patch,
>> though.  I think it is a reasonable thing to ask for from a
>> clone.  For example, if you are coming from CVS or have used
>> Cogito, cloning a single branch is not an unusual operation at
>> all.
>
> But when we clone whole repository we could have download whole
> object database of cloned repo as-is (perhaps packing loose objects
> in smart/git-aware transports).

I think your point is if you have branches A and B, cloning A+B as a whole is a lot less expensive than cloning A and then B separately. While that is true, I do not think that reasoning would apply to somebody, especially behind a slow link, who is only interested in A. She does not want to pay the cost of A+B, when she only wants A, even if A+B is much less expensive than twice the cost of getting A.

Also, if she later gets interested in B, git fetch will make the "what's common" optimization. It won't be like cloning A and then fetching B into the same repository later would be twice as expensive compared to the case where you start from a clone as a whole. The overall transfer cost would probably be comparable.

> By the way, there was discussed idea about marking pu-like branches
> as being rewound (non-fast forwarding) in the config file, and somehow
> transferring this information for git-clone for it to have '+' for
> some refspecs. What happened to that idea? Was it abandoned...

Well, I would not call some idle talk without a concrete design (preferably with a proof-of-concept code, but that is not an absolute requirement) "idea". Something that did not even start cannot get abandoned ;-).

I thought that it would not hurt to have something like that, but because in 1.5.0 "git clone" creates fetch configuration of 'forcing' kind by default, I do not think it makes that much of a difference.

Previous: Jakub NarebskiNext: Johannes Schindelin
Message 14 of 20 in “add --remote option to git-clone.”
  1. add --remote option to git-clone.Michael S. Tsirkin, Feb 1, 2007
  2. J. Bruce FieldsFeb 1, 2007
  3. Shawn O. PearceFeb 1, 2007
  4. Michael S. TsirkinFeb 1, 2007
  5. Yann DirsonFeb 1, 2007
  6. Johannes SchindelinFeb 1, 2007
  7. Shawn O. PearceFeb 1, 2007
  8. Michael S. TsirkinFeb 1, 2007
  9. Johannes SchindelinFeb 1, 2007
  10. Junio C HamanoFeb 2, 2007
  11. Johannes SchindelinFeb 2, 2007
  12. Junio C HamanoFeb 3, 2007
  13. Jakub NarebskiFeb 3, 2007
  14. Junio C HamanoFeb 3, 2007
  15. Johannes SchindelinFeb 5, 2007
  16. Junio C HamanoFeb 5, 2007
  17. Linus TorvaldsFeb 5, 2007
  18. Michael S. TsirkinFeb 5, 2007
  19. Shawn O. PearceFeb 5, 2007
  20. Michael S. TsirkinFeb 5, 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.