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

Re: efficient cloning

From
Petr Baudis <pasky@suse.cz>
Date
Mar 20, 2006, 23:21 UTC
Message-ID
<20060320232101.GQ18185@pasky.or.cz>
In-Reply-To
<7voe00iupp.fsf@assigned-by-dhcp.cox.net>

Dear diary, on Tue, Mar 21, 2006 at 12:04:34AM CET, I got a letter where Junio C Hamano <junkio@cox.net> said that...

> I think what is reasonable is something like this:
<insert all of the arguments in my other mail here ;>
>  - If your repository was cloned with --use-separate-remote, the
>    upstream "master" is refs/remotes/master, so the same diff
>    can be had with "diff remotes/master master".

Which is ugly. There is no reason why you couldn't go on using 'origin' which is shorter and we can usually still unambiguously decide what did you mean (unless you have a local head/tag 'origin' _and_ a remote named 'origin' at the same time).

>  - Regardless of how you started your cloned repository, with an
>    $GIT_DIR/{remotes,refs/heads,refs/remotes} editor I hinted in
>    a separate message, you can rearrange things to organize the
>    refs/ hierarchy any way you want.

Yes, but that makes no sense to do when you usually need this only in some very special cases (and then you ought to be able to set up the weird thing yourself), while we can do the doubtlessly right thing in the general case, WITHOUT confusing the user, WHILE keeping things tidy and easy to use (and without excessive typing). In fact, you described it yourself:

Show 5 quoted lines
>    - You could for example arrange to track all my branches in
>      refs/remotes/junkio/, and if git-pasky were still alive,
>      Pasky's branches in refs/remotes/pasky.  If we had a "take
>      the unique tail-name anywhere under refs/" logic, the same
>      diff can be had with "diff junkio/master master".

Except that you can just name the refs/remotes/directory the same way you name the remote repository identifier (be it a Git-style remote or Cogito's remote branch).

I still don't get what's wrong on what I'm proposing. I'm not seeing the disadvantages, if there are any.

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Right now I am having amnesia and deja-vu at the same time.  I think
I have forgotten this before.
Previous: Junio C HamanoNext: Junio C Hamano
Message 13 of 22 in “efficient cloning”
  1. James CloosMar 19, 2006
  2. Shawn PearceMar 19, 2006
  3. Junio C HamanoMar 19, 2006
  4. James CloosMar 20, 2006
  5. Junio C HamanoMar 20, 2006
  6. Junio C HamanoMar 20, 2006
  7. Petr BaudisMar 20, 2006
  8. Junio C HamanoMar 20, 2006
  9. Petr BaudisMar 20, 2006
  10. Junio C HamanoMar 20, 2006
  11. Josef WeidendorferMar 20, 2006
  12. Junio C HamanoMar 20, 2006
  13. Petr BaudisMar 20, 2006
  14. Junio C HamanoMar 20, 2006
  15. Andreas EricssonMar 21, 2006
  16. Junio C HamanoMar 21, 2006
  17. Jeff KingMar 21, 2006
  18. Junio C HamanoMar 21, 2006
  19. Petr BaudisMar 21, 2006
  20. Josef WeidendorferMar 21, 2006
  21. Junio C HamanoMar 21, 2006
  22. Junio C HamanoMar 21, 2006

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.