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

Re: Implementing branch attributes in git config

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
May 9, 2006, 11:21 UTC
Message-ID
<Pine.LNX.4.63.0605091321350.7652@wbgn013.biozentrum.uni-wuerzburg.de>
In-Reply-To
<e3p5om$djs$1@sea.gmane.org>
Hi,
On Tue, 9 May 2006, Jakub Narebski wrote:
Show 19 quoted lines
> Linus Torvalds wrote:
> 
> > I would suggest a much more readable format:
> > 
> > [core]
> > ...
> > 
> > [branch "core"]
> > ...
> > 
> > [remote "core"]
> > ...
> > 
> > and yes, enforce the <space>+<quoted name> format. We'd turn it internally
> > into some random internal string format (probably replacing the space with
> > a dot, and removing the quotes, so it would become "remote.core.<key>").
> 
> I'm all for it. Nice compromise of [branch."miXedCaps"] and ["miXedCaps"],
> human readable end editable, and easy parsable.
Okay, to summarize what people proposed (and that I remember):
1) [branch."AnY+String"]
2) multiple [branch]
3) magic <space>+<quoted>
4) [branch.just/allow-slashes/and-dashes]
5) the " for " notation

Of all these, only (5) is backwards compatible, but it is also the only one where you have to type the branch name over and over again.

However, the old gits do not really know what to do with the [branch] section anyway, so you could consider (2) (and (4), if you do not have branch names with slashes and/or dashes) backwards-compatible, because git will continue to work -- ignoring the funny entries.

(1) and (3) definitely would make an old git choke.
Now, for the ease of use:

(1), (3) and (4) are in the same league of easiness (except maybe that you have to keep in mind to extra-quote in shell scripts with (1) and (3)), (2) is especially good for people with a database mindset, and (5) is annoying as hell.

Now, for the ease of implementation:

(1) and (3) are in the same league, they have to change the way the config is parsed as well as make downcasing conditional in repo-config. (2) is obviously hardest of all. (4) is very easy (one line in config.c), and (5) easiest (nothing to do).

Now, for the versatility, i.e. what you can express with the syntax:

The same for all (except for (4) which has very weak restrictions on the branch name).

Oh, I completely forgot about another proposal: (6) subkeys (something like "url[branchname] = blablabla"). It has about the same effects as (1) or (3).

Another thing: I completely ignored the case sensitivity. Because it is irrelevant. Why? Because you do not have two branches which are only different by case-ness. It is confusing, and that's why. And you don't need to handle the case specially, because the comparison is done by downcasing anyway.

Obviously, I deem (4) the best solution ATM, because it has all the expressability needed, while being the simplest.

Ciao, Dscho

Previous: Jakub NarebskiNext: Linus Torvalds
Message 44 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.