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

Re: efficient cloning

From
JWJosef Weidendorfer <josef.weidendorfer@gmx.de>
Date
Mar 21, 2006, 00:26 UTC
Message-ID
<200603210126.59870.Josef.Weidendorfer@gmx.de>
In-Reply-To
<7voe00iupp.fsf@assigned-by-dhcp.cox.net>
On Tuesday 21 March 2006 00:04, you wrote:
> > Linus wanted to still be able to say "origin" which automatically
> > would map to "remotes/origin/master", where the name of the remote
> 
> I do not remember that,

See http://www.gelato.unsw.edu.au/archives/git/0603/17405.html

I found it strange at first. But I think it is the right thing.
Show 6 quoted lines
> I think what is reasonable is something like this:
> 
>  - If you start from a repository cloned in the traditional
>    way, the upstream "master" is kept track of with your
>    "origin", so "diff origin master" would be "my changes on top
>    of the upstream".

Yes. And it would be nice if the same would work with the new layout, assuming that there is no local "origin" branch, but a .git/remotes/origin file and .git/refs/remotes/origin directory.

>  - 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. Still it would be nice to have a fixed convention here. Eg. gitk could decorate the namespace in a special way. Even if it is most of the time "origin" only.

Show 5 quoted lines
> [Footnote]
> 
> *1* ... which currently I do not plan to do myself unless I have
> absolutely nothing else to do and really bored.  A sound of huge
> hint dropping ;-).
It should be as simple as (probably with quite some errors)

~/> cat git-rename-remote.sh mv .git/refs/remotes/$1 .git/refs/remotes/$2 sed -e "s|remotes/$1|remotes/$2" .git/remotes/$1 > .git/remotes/$2 rm .git/remotes/$1

If you allow more freedom regarding the use of refs/remotes, it gets more complicated both for the script and for the user to understand.

Josef
Previous: Petr BaudisNext: Junio C Hamano
Message 20 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.