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

Re: GIT and the current -stable

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Apr 14, 2007, 17:34 UTC
Message-ID
<Pine.LNX.4.64.0704141028460.5473@woody.linux-foundation.org>
In-Reply-To
<7vfy73bhik.fsf@assigned-by-dhcp.cox.net>
On Fri, 13 Apr 2007, Junio C Hamano wrote:
Show 7 quoted lines
> 
> I think adding these lines to .git/config would do the trick,
> after you have done the "checkout -b v2.6.20 v2.6.20" step:
> 
> [branch "v2.6.20"]
> 	remote = stable
> 	merge = refs/heads/master

Please don't do this. Using the same name for a branch as for a tag is madness. Call it "v2.6.20-stable" or anything else, but don't re-use the same naming as for tags.

Sure, git will have some random well-defined order of parsing which one "v2.6.20" actually means in any particular context (usually the tag-name will take precedence, except for contexts where the branchname is required!), and yeah, you can always make things unambiguous by specifying the full name (ie say "[refs/]tags/v2.6.20" when you want to make sure it's unambiguously the tag, not the branch) but it's still guaranteed to cause confusion at *some* level, if only for the user.

So just don't do it. 
		Linus
Previous: Greg KHNext: Gerb Stralko
Message 5 of 16 in “GIT and the current -stable”
  1. Rene HermanApr 14, 2007
  2. Junio C HamanoApr 14, 2007
  3. Rene HermanApr 14, 2007
  4. Greg KHApr 14, 2007
  5. Linus TorvaldsApr 14, 2007
  6. Gerb StralkoApr 14, 2007
  7. Chris WrightApr 14, 2007
  8. Rene HermanApr 14, 2007
  9. Rene HermanApr 14, 2007
  10. Julian PhillipsApr 15, 2007
  11. Brian GernhardtApr 14, 2007
  12. Chris WrightApr 14, 2007
  13. Brian GernhardtApr 14, 2007
  14. Chris WrightApr 14, 2007
  15. Julian PhillipsApr 14, 2007
  16. Uwe Kleine-KönigApr 14, 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.