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

Re: Implementing branch attributes in git config

From
sean <seanlkml@sympatico.ca>
Date
May 9, 2006, 02:47 UTC
Message-ID
<BAYC1-PASMTP04C9C4BF5B89E55B9D877AAEA90@CEZ.ICE>
In-Reply-To
<Pine.LNX.4.64.0605081854190.3718@g5.osdl.org>

On Mon, 8 May 2006 18:57:08 -0700 (PDT) Linus Torvalds <torvalds@osdl.org> wrote:

Show 7 quoted lines
> Btw, I keep coming back to the same
> 
> 	["jc/show-branch-dense"]
> 		remote = git://...
> 
> branch specifier syntax. It just seems very intuitive and is easy to 
> parse. 

We already need such section headers for remotes, and for branches.. both which may well need to be quoted as above.. how to distinguish between them? How to handle the next case that comes along where we want these special header semantics?

We really need:
   [branch.Whatever]
and:
   [remote.Whatever]

As in the case of "origin" where we have a remote and a branch named that.

> The only real downside ends up being the non-forwards-compatibility thing. 
> But trying to be forwards-compatible for old git versions with this thing 
> would seem to be a major pain for rather slim gain.

What's the advantage of section quotation marks over just allowing these characters in regular section names? To be specific, what is wrong with:

   [jc/show-branch-dense]
       remote = git://...

If we just relax the legal characters in identifiers to include slash and dash? It doesn't seem to be any different in amount of code needed to achieve, and it is just as intuitive (perhaps more so) and no worse on the forward-compatibility thing.

If we continue with case insensitive section names, it's quite possible for the user to mess up while hand editing or forgetting proper "git" quoting rules on the command line and end up with silent breakage:

$ git repo-config "Branch".url = git://...  
        (updates section ["Branch"])
And then the next time forget the quotes and use:
$ git repo-config Branch.url = git://...    
         (updates section [branch])

And all of a sudden the user is updating _different_ sections with unpredictable results. This is just awkward; why not just admit that section names should always be case sensitive if we're going to put filenames inside them?

Sean
Previous: Linus TorvaldsNext: Linus Torvalds
Message 39 of 75 in “Implementing branch attributes in git config”
  1. Pavel RoskinMay 7, 2006
  2. Junio C HamanoMay 7, 2006
  3. Johannes SchindelinMay 8, 2006
  4. Linus TorvaldsMay 8, 2006
  5. Linus TorvaldsMay 8, 2006
  6. Linus TorvaldsMay 8, 2006
  7. Johannes SchindelinMay 8, 2006
  8. Pavel RoskinMay 8, 2006
  9. Johannes SchindelinMay 8, 2006
  10. Pavel RoskinMay 8, 2006
  11. Junio C HamanoMay 8, 2006
  12. Johannes SchindelinMay 8, 2006
  13. Pavel RoskinMay 8, 2006
  14. seanMay 8, 2006
  15. Linus TorvaldsMay 8, 2006
  16. Pavel RoskinMay 8, 2006
  17. seanMay 8, 2006
  18. Pavel RoskinMay 8, 2006
  19. Linus TorvaldsMay 8, 2006
  20. Junio C HamanoMay 8, 2006
  21. seanMay 8, 2006
  22. Johannes SchindelinMay 8, 2006
  23. seanMay 8, 2006
  24. Junio C HamanoMay 8, 2006
  25. seanMay 8, 2006
  26. Daniel BarkalowMay 8, 2006
  27. seanMay 8, 2006
  28. Johannes SchindelinMay 8, 2006
  29. seanMay 9, 2006
  30. Johannes SchindelinMay 9, 2006
  31. Linus TorvaldsMay 9, 2006
  32. seanMay 9, 2006
  33. Junio C HamanoMay 9, 2006
  34. Linus TorvaldsMay 9, 2006
  35. Junio C HamanoMay 9, 2006
  36. Linus TorvaldsMay 9, 2006
  37. Junio C HamanoMay 9, 2006
  38. Linus TorvaldsMay 9, 2006
  39. seanMay 9, 2006
  40. Linus TorvaldsMay 9, 2006
  41. seanMay 9, 2006
  42. Linus TorvaldsMay 9, 2006
  43. Jakub NarebskiMay 9, 2006
  44. Johannes SchindelinMay 9, 2006
  45. Linus TorvaldsMay 9, 2006
  46. Junio C HamanoMay 9, 2006
  47. Linus TorvaldsMay 9, 2006
  48. seanMay 9, 2006
  49. seanMay 9, 2006
  50. Junio C HamanoMay 9, 2006
  51. seanMay 9, 2006
  52. Linus TorvaldsMay 10, 2006
  53. seanMay 10, 2006
  54. Linus TorvaldsMay 10, 2006
  55. Martin LanghoffMay 10, 2006
  56. Johannes SchindelinMay 10, 2006
  57. Linus TorvaldsMay 10, 2006
  58. Jakub NarebskiMay 10, 2006
  59. Martin LanghoffMay 10, 2006
  60. Linus TorvaldsMay 10, 2006
  61. Linus TorvaldsMay 11, 2006
  62. Jeff KingMay 11, 2006
  63. Jeff KingMay 11, 2006
  64. Martin LanghoffMay 11, 2006
  65. Johannes SchindelinMay 11, 2006
  66. Nicolas PitreMay 11, 2006
  67. Jakub NarebskiMay 11, 2006
  68. seanMay 10, 2006
  69. Junio C HamanoMay 11, 2006
  70. Martin WaitzMay 9, 2006
  71. Johannes SchindelinMay 9, 2006
  72. Johannes SchindelinMay 8, 2006
  73. Pavel RoskinMay 9, 2006
  74. seanMay 9, 2006
  75. Pavel RoskinMay 9, 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.