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

Re: [RFH] An early draft of v1.5.0 release notes

From
Junio C Hamano <junkio@cox.net>
Date
Dec 28, 2006, 02:58 UTC
Message-ID
<7v64bw3ewk.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<200612271206.kBRC6ke2004207@laptop13.inf.utfsm.cl>
"Horst H. von Brand" <vonbrand@inf.utfsm.cl> writes:
Show 8 quoted lines
> Junio C Hamano <junkio@cox.net> wrote:
>> This is still rough, but I think we have a pretty good idea what
>> will and what won't be in v1.5.0 by now, and end-of-year is a
>> good slow time to summarize what we have done.
>
> Could somebody please summarize how to "upgrade" a repository to the new
> layout?  This has got my head spinning... and I'm /not/ cloning the
> various repos I've got here just to take advantage of the changes.

The old layout was to map remote branch $B to local tracking branch .git/refs/heads/$B, unless $B == 'master' in which case it was mapped to .git/refs/heads/origin (and I think we discarded 'origin' at remote).

Each remote branch $B is tracked with .git/refs/remote/origin/$B in the new layout.

And you will get something like this in your .git/config:
    [remote "origin"]
            url = git://git.kernel.org/pub/scm/.../torvalds/linux-2.6.git/
            fetch = refs/heads/*:refs/remotes/origin/*
    [branch "master"]
            remote = origin
            merge = refs/heads/master

The first section defines what the token 'origin' means when you say "git pull origin" or "git fetch origin". remote.origin.url defines the URL to fetch/pull from, and remote.origin.fetch supplies the refspecs you omitted from the command line (fetch everything from refs/heads/ hierarchy of remote and store them in my refs/remotes/origin/ hierarchy).

The second section defines what happens when you say "git pull" or "git fetch" while on your "master" branch. It tells that you meant to say "git pull origin" or "git fetch origin" when you omitted the URL argument from the command line. And because you are also omitting the refspecs, remote.origin.fetch kicks in and slurps all the branches from the remote side and stores them in your refs/remotes/origin/ hierarchy. When the command was "git pull", it also says the merge that follows the fetch is to merge the 'master' branch at the remote side (which happens to be copied to your remotes/origin/master only because you have remote.origin.fetch) into your current branch (which is "master", because this section is about what happens while you are on your "master" branch).

So for an existing repository that does not use the separate remotes layout, you can easily convert that by hand if you wanted to by:

 - Move tracking branches from refs/heads/* to
   refs/remotes/origin/*,
 - create the config section like the above in .git/config, and
 - remove .git/remotes/origin when you are done.
Previous: Horst H. von BrandNext: Jakub Narebski
Message 89 of 96 in “Re: Status of git.git repository”
  1. Horst von BrandAug 1, 2005
  2. Horst von BrandAug 8, 2005
  3. Horst von BrandAug 10, 2005
  4. Johannes SchindelinAug 10, 2005
  5. Horst von BrandAug 16, 2005
  6. Johannes SchindelinAug 16, 2005
  7. Matthias UrlichsAug 18, 2005
  8. Horst von BrandSep 2, 2005
  9. Tim OttingerSep 6, 2005
  10. Horst von BrandSep 4, 2005
  11. Junio C HamanoSep 5, 2005
  12. Peter WilliamsSep 5, 2005
  13. Junio C HamanoSep 5, 2005
  14. Peter WilliamsSep 5, 2005
  15. Horst von BrandSep 5, 2005
  16. Junio C HamanoSep 5, 2005
  17. Linus TorvaldsSep 5, 2005
  18. David KågedalSep 5, 2005
  19. Linus TorvaldsSep 5, 2005
  20. David KågedalSep 5, 2005
  21. Junio C HamanoSep 5, 2005
  22. Junio C HamanoSep 5, 2005
  23. Martin LanghoffSep 6, 2005
  24. Linus TorvaldsSep 6, 2005
  25. Junio C HamanoSep 6, 2005
  26. Linus TorvaldsSep 6, 2005
  27. Junio C HamanoSep 6, 2005
  28. David KågedalSep 6, 2005
  29. Junio C HamanoSep 6, 2005
  30. Tool renames.Junio C Hamano, Sep 8, 2005
  31. H. Peter AnvinSep 15, 2005
  32. Junio C HamanoSep 15, 2005
  33. Junio C HamanoSep 15, 2005
  34. H. Peter AnvinSep 16, 2005
  35. Junio C HamanoSep 16, 2005
  36. Martin LanghoffSep 6, 2005
  37. Horst von BrandSep 13, 2005
  38. Linus TorvaldsSep 13, 2005
  39. Junio C HamanoSep 13, 2005
  40. Linus TorvaldsSep 13, 2005
  41. Horst von BrandSep 13, 2005
  42. Junio C HamanoSep 13, 2005
  43. Horst von BrandSep 17, 2005
  44. Horst von BrandSep 20, 2005
  45. Horst von BrandOct 3, 2005
  46. Horst von BrandOct 4, 2005
  47. Horst von BrandOct 27, 2005
  48. Archaeology [Was: Re: GIT 0.99.9]Horst von Brand, Oct 31, 2005
  49. Horst von BrandNov 1, 2005
  50. Junio C HamanoNov 2, 2005
  51. Horst von BrandNov 6, 2005
  52. Kay SieversNov 6, 2005
  53. Junio C HamanoNov 6, 2005
  54. Petr BaudisNov 6, 2005
  55. Junio C HamanoNov 6, 2005
  56. Petr BaudisNov 6, 2005
  57. Horst von BrandDec 4, 2005
  58. H. Peter AnvinDec 4, 2005
  59. Horst von BrandDec 22, 2005
  60. Horst von BrandJan 28, 2006
  61. Junio C HamanoJan 28, 2006
  62. Horst von BrandJun 4, 2006
  63. Horst von BrandJun 6, 2006
  64. Junio C HamanoJun 6, 2006
  65. Horst von BrandJun 6, 2006
  66. Junio C HamanoJun 6, 2006
  67. Horst von BrandJun 6, 2006
  68. Junio C HamanoJun 6, 2006
  69. Horst von BrandJun 6, 2006
  70. Horst H. von BrandOct 10, 2006
  71. Junio's wishes [Was: Re: Approxidate licensing]Horst H. von Brand, Oct 10, 2006
  72. Linus TorvaldsOct 10, 2006
  73. Horst H. von BrandOct 13, 2006
  74. Nicolas PitreOct 13, 2006
  75. Horst H. von BrandOct 15, 2006
  76. Horst H. von BrandOct 20, 2006
  77. Horst H. von BrandOct 26, 2006
  78. Junio C HamanoOct 26, 2006
  79. Horst H. von BrandOct 29, 2006
  80. Horst H. von BrandNov 6, 2006
  81. Junio C HamanoNov 6, 2006
  82. Horst H. von BrandNov 15, 2006
  83. Horst H. von BrandNov 20, 2006
  84. Junio C HamanoNov 20, 2006
  85. Horst H. von BrandNov 26, 2006
  86. Horst H. von BrandDec 14, 2006
  87. Jakub NarebskiDec 15, 2006
  88. Horst H. von BrandDec 27, 2006
  89. Junio C HamanoDec 28, 2006
  90. Jakub NarebskiDec 28, 2006
  91. Horst H. von BrandDec 28, 2006
  92. Shawn PearceDec 28, 2006
  93. Horst H. von BrandDec 29, 2006
  94. Horst H. von BrandJan 8, 2007
  95. Horst H. von BrandJan 12, 2007
  96. Junio C HamanoJan 12, 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.