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

Re: Updated git HOWTO for kernel hackers

From
Linus Torvalds <torvalds@osdl.org>
Date
Jun 23, 2005, 05:58 UTC
Message-ID
<Pine.LNX.4.58.0506222225010.11175@ppc970.osdl.org>
In-Reply-To
<42BA45B1.7060207@pobox.com>
On Thu, 23 Jun 2005, Jeff Garzik wrote:
>
> No complaint with that operation.  The complaint is that it's an 
> additional operation.  Re-read what Greg said:
Please re-read what I said.

Pulling a regular head _cannot_ and _must_not_ update tags. Tags are not associated with the tree, and they _cannot_ and _must_not_ be so, exactly because that would make them global instead of private, and it would fundamentally make them not be distributed, and would mean that they'd be pointless as anything but "Linus' official tags".

That's what we had in BK _AND IT DOES NOT WORK_!
Does it help when I scream?
> > Is there some reason why git doesn't pull the
> > tags in properly when doing a merge?  Chris and I just hit this when I
> > pulled his 2.6.12.1 tree and and was wondering where the tag went.

And I suggested that if you want that, then you pull on the TAG. You take my modification, you test it, and you see if

	git fetch tag ..repo.. tagname
works.

That solves exactly the case that Greg is complaining about, and it solves it in a _sane_ manner: you tell git that you want a tag, and git fetches it for you. It's that simple, and it does not introduce the _BROKEN_ notion that tags are associated directly with the commit itself and somehow visible to all.

> Multiple users -- not just me -- would prefer that git-pull-script 
> pulled the tags, too.

And multiple users -- clearly including you -- aren't listening to me. Tags are separate from the source they tag, and they HAVE TO BE. There is no "you automatically get the tags when you get the tree", because the two don't have a 1:1 relationship.

And not making them separate breaks a lot of things. As mentioned, it fundamentally breaks the distributed nature, but that also means that it breaks whenever two people use the same name for a tag, for example. You can't "merge" tags. BK had a very strange form of merging, which was (I think) to pick the one last in the BK ChangeSet file, but that didn't make it "right". You just never noticed, because Linux could never use tags at all due to the lack of privacy, except for big releases..

> Suggested solution:  add '--tags' to git-pull-script 
> (git-fetch-script?), which calls
> 	rsync -r --ignore-existing repo/refs/tags/ .git/refs/tags/

How is this AT ALL different from just having a separate script that does this? You've introduced nothing but syntactic fluff, and you've made it less flexible at the same time. First off, you might want to get new tags _without_ fetching anything else, and you might indeed want to get the tags _first_ in order to decide what you want to fetch. In fact, in many cases that's exactly what you want, namely you want to fetch the data based on the tag.

Secondly, if your worry is that you forget, then hell, write a small shell function, and be done with it.

BUT DO NOT MESS UP THINGS FOR OTHER PEOPLE.

When I fetch somebody elses head, I had better not fetch his tags. His tags may not even make _sense_ in what I have - he may tag things in other branches that I'm not fetching at all. In fact, his tag-namespace might be _different_ from mine, ie he might have tagged something "broken" in his tree, and I tagged something _else_ "broken" in mine, just because it happens to be a very useful tag for when you want to mark "ok, that was a broken tree".

It is wrong, wrong, _wrong_ to think that fetching somebody elses tree means that you should fetch his tags. The _only_ reason you think it's right is because you've only ever seen centralized tags: tags were the one thing that BK kept centralized.

But once people realize that they can use tags in their own trees, and nobody else will ever notice, they'll slowly start using them. Maybe it takes a few months or even longer. But it will happen. And I refuse to make stupid decisions that makes it not work.

And thinking that "fetching a tree fetches all the tags from that tree" really _is_ a stupid decision. It's missing the big picture. It's missing the fact that tags _should_ be normal every-day things that you just use as "book-marks", and that the kind of big "synchronization point for many people" tag should actually be the _rare_ case.

The fact that global tags make that private "bookmark" usage impossible should be a big red blinking sign saying "don't do global tags".

> Let the kernel hacker say "yes, I really do want to download the tags 
> Linus publicly posted in linux-2.6.git/refs/tags" because this was a 
> common operation in the previous workflow, a common operation that we 
> -made use of-.

And I already suggested a trivial script. Send me the script patch, instead of arguing for stupid things.

			Linus
Previous: Jeff GarzikNext: Greg KH
Message 19 of 94 in “Updated git HOWTO for kernel hackers”
  1. Jeff GarzikJun 22, 2005
  2. Dave JonesJun 22, 2005
  3. Jeff GarzikJun 22, 2005
  4. Dave JonesJun 22, 2005
  5. Jeff GarzikJun 23, 2005
  6. Jeff GarzikJun 25, 2005
  7. Dave JonesJun 25, 2005
  8. Greg KHJun 22, 2005
  9. Linus TorvaldsJun 22, 2005
  10. Jeff GarzikJun 23, 2005
  11. Linus TorvaldsJun 23, 2005
  12. Jeff GarzikJun 23, 2005
  13. Linus TorvaldsJun 23, 2005
  14. Jeff GarzikJun 23, 2005
  15. Linus TorvaldsJun 23, 2005
  16. Jeff GarzikJun 23, 2005
  17. Linus TorvaldsJun 23, 2005
  18. Jeff GarzikJun 23, 2005
  19. Linus TorvaldsJun 23, 2005
  20. Greg KHJun 23, 2005
  21. Linus TorvaldsJun 23, 2005
  22. Greg KHJun 23, 2005
  23. Jeff GarzikJun 23, 2005
  24. Petr BaudisJun 23, 2005
  25. Martin LanghoffJun 23, 2005
  26. Vojtech PavlikJun 23, 2005
  27. Linus TorvaldsJun 22, 2005
  28. Jeff GarzikJun 23, 2005
  29. Linus TorvaldsJun 23, 2005
  30. Jeff GarzikJun 23, 2005
  31. Linus TorvaldsJun 23, 2005
  32. Linus TorvaldsJun 23, 2005
  33. Jeff GarzikJun 23, 2005
  34. Linus TorvaldsJun 23, 2005
  35. Adam KropelinJun 23, 2005
  36. Linus TorvaldsJun 23, 2005
  37. Jeff GarzikJun 23, 2005
  38. Linus TorvaldsJun 23, 2005
  39. Miles BaderJun 23, 2005
  40. Jeff GarzikJun 23, 2005
  41. Linus TorvaldsJun 23, 2005
  42. Anton AltaparmakovJun 23, 2005
  43. Daniel BarkalowJun 23, 2005
  44. Dave AirlieJun 23, 2005
  45. Mercurial vs Updated git HOWTO for kernel hackersMatt Mackall, Jun 23, 2005
  46. Petr BaudisJun 24, 2005
  47. Christopher LiJun 24, 2005
  48. Petr BaudisJun 28, 2005
  49. Andrew ThompsonJun 28, 2005
  50. Petr BaudisJun 28, 2005
  51. Matt MackallJun 28, 2005
  52. Kyle MoffettJun 28, 2005
  53. SeanJun 28, 2005
  54. Matt MackallJun 28, 2005
  55. SeanJun 28, 2005
  56. Kyle MoffettJun 28, 2005
  57. Matt MackallJun 28, 2005
  58. SeanJun 28, 2005
  59. Kyle MoffettJun 28, 2005
  60. SeanJun 28, 2005
  61. Kyle MoffettJun 29, 2005
  62. SeanJun 29, 2005
  63. Kyle MoffettJun 29, 2005
  64. Vojtech PavlikJun 29, 2005
  65. Matt MackallJun 28, 2005
  66. Thomas Arendsen HeinJun 29, 2005
  67. Andrea ArcangeliJun 24, 2005
  68. Theodore Ts'oJun 24, 2005
  69. Paolo CiarrocchiJun 24, 2005
  70. Christopher LiJun 24, 2005
  71. Kevin SmithJun 24, 2005
  72. Matt MackallJun 24, 2005
  73. Petr BaudisJun 28, 2005
  74. Sven VerdoolaegeJun 28, 2005
  75. Petr BaudisJun 28, 2005
  76. Cygwin and Native MS Windows (was: Mercurial vs Updated git HOWTO for kernel hackers)Kevin Smith, Jun 28, 2005
  77. Cogito vs. Git (was: Mercurial vs Updated git HOWTO for kernel hackers)Kevin Smith, Jun 28, 2005
  78. Petr BaudisJun 28, 2005
  79. Matthias UrlichsJun 24, 2005
  80. Linus TorvaldsJun 24, 2005
  81. John W. LinvilleJun 24, 2005
  82. Jeff GarzikJun 24, 2005
  83. Daniel BarkalowJun 24, 2005
  84. Should "git-read-tree -m -u" delete files?Junio C Hamano, Jun 24, 2005
  85. Joel BeckerJun 24, 2005
  86. Kyle MoffettJun 24, 2005
  87. Pavel MachekJun 27, 2005
  88. Kyle MoffettJun 27, 2005
  89. Matt MackallJun 27, 2005
  90. Benjamin LaHaiseJun 27, 2005
  91. Matt MackallJun 27, 2005
  92. Ed TomlinsonJun 27, 2005
  93. Amin AzezJul 8, 2005
  94. Amin AzezJul 11, 2005

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.