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 5, 2007, 17:58 UTC
Message-ID
<7vmz3smqpp.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.63.0702051245050.22628@wbgn013.biozentrum.uni-wuerzburg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 11 quoted lines
> Oh? Well, to me, "clone" meant something like the genetics thing, i.e. get 
> a copy of the repository. Since a "branch" is not the complete repository, 
> but only part of it, I would have expected "engraft" instead of "clone" 
> there.
>
> But I can learn! So (post-1.5.0, maybe?) I'd be perfectly d'accord with 
> something like this
>
> 	git clone git://.../git.git#html
>
> to mean "just fetch the branch html, and check it out".

I agree that the word "clone" to me sounds like "copy the whole repo", so a single branch cloning feels it is something different from "clone", but I do not think it means wholeness must be the only mode of operation.

Except that I do not particularly think the URL fragment notation is such a "cool" syntax.

Show 10 quoted lines
>> I think the logic to decide where to point remotes/$origin/HEAD to 
>> should be moved to "git-remote add -m" when we eventually rewrite 
>> "git-clone" to use "git-remote add -f".  And while we would do so, we 
>> can make a trivial extension to fetch-pack protocol to carry the HEAD 
>> symref information.  All will be good once that happens.
>
> Would you like this as a multi_ack-like extension?
>
> But then how to teach the dumb protocols in a backwards-compatible 
> fashion?

I am not talking about enhancing ls-remote output nor info/refs file format. I do not think we need to do anything special to support it in backwards compatible way.

Look at what dumb protocols do in git-clone. http already knows where HEAD points at when it fetches HEAD with curl. I do not particularly care about rsync, but I suspect it can be handled the same way.

Previous: Johannes SchindelinNext: Linus Torvalds
Message 16 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.