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

Re: any way to apply tag across all branches in repository?

From
CFChris Friesen <cfriesen@nortel.com>
Date
May 19, 2009, 20:56 UTC
Message-ID
<4A131D16.1030001@nortel.com>
In-Reply-To
<alpine.LFD.2.01.0905191307320.3301@localhost.localdomain>
Linus Torvalds wrote:
> On Tue, 19 May 2009, Chris Friesen wrote:
Show 18 quoted lines
>> The brute-force way to do this would be to manually loop through each branch
>> and create a tag of the form "$branch_$version" to ensure unique tags.  But I was
>> hoping there was a more elegant way.
> 
> Well, I would suggest that you do it fundamentally differently.
> 
> Instead of tagging each build, I would suggest just associating each build 
> with the commit SHA1 of the time. That's what Linux does (if you enable 
> CONFIG_LOCALVERSION_AUTO), and it's _way_ superior to lots of crazy tags.
> 
> So for example, I can do
> 
> 	[torvalds@nehalem ~]$ uname -r
> 	2.6.30-rc6-00302-g72357d5-dirty
> 
> and it tells me exactly what kernel version I'm running (well, the "dirty"
> part means that it's not exact and has some additional patches that 
> weren't committed, but that's as close as you can get). It's very useful.

Agreed. The project in question actually involves (among other things) a linux kernel build, so we will be making use of this to work backwards from the running kernel to the commit used to generate it.

However, we also want to be able to work in the other direction--given a known-buggy kernel commit, which shipped versions of the product contain the buggy code? We do in-the-field upgrades, and different sites may be running different versions, so it's important to be able to easily determine which sites are currently running the buggy code so that we can get them upgraded. We know which sites are running which versions, so it is useful to tag the repository branches with that version number.

Show 5 quoted lines
> Trust me, something like the above is _much_ better than tagging each 
> branchthat you build. Partly because it means that you can do the builds 
> in a distributed manner, and they'll all get the version built in, rather 
> than having to rely on everybody tagging everything and then trying to 
> match up the tag to some random binary.

The tagging would be done only by the "official" build process (which pulls from an "official" repository), not by each designer. Typically the official builds would be done weekly, more frequently if requested.

Chris
Previous: Linus TorvaldsNext: Linus Torvalds
Message 9 of 16 in “any way to apply tag across all branches in repository?”
  1. Chris FriesenMay 19, 2009
  2. Tomas CarneckyMay 19, 2009
  3. Chris FriesenMay 19, 2009
  4. Brandon CaseyMay 19, 2009
  5. Chris FriesenMay 19, 2009
  6. Linus TorvaldsMay 19, 2009
  7. Chris FriesenMay 19, 2009
  8. Linus TorvaldsMay 19, 2009
  9. Chris FriesenMay 19, 2009
  10. Linus TorvaldsMay 19, 2009
  11. Chris FriesenMay 19, 2009
  12. Brandon CaseyMay 19, 2009
  13. Chris FriesenMay 19, 2009
  14. Brandon CaseyMay 19, 2009
  15. Chris FriesenMay 19, 2009
  16. Brandon CaseyMay 19, 2009

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.