On Tue, 9 May 2006, sean wrote:That's what my stupid patch does now. It seems to work well for all cases, but if we were to care, we could have some special heuristics for different section names (ie "if subsection is all lower-case alphanumerics, and the section name is one of the following, use the old-fashioned format"). I don't see _why_ we'd ever do that, but we certainly _could_, if it were to make more sense that way for some section name. However, if you already use a syntax like [section.subsection] key = 1 and then do git-repo-config --replace-all section.subsection.new 2 it will actually keep the old section header, so you'll end up with [section.subsection] key = 1 new = 2 but if you create a _new_ subsection (and since subsections are now case sensitive, this example is a "new" subsection): git-repo-config --replace-all section.SubSection.new 3 you will now have [section.subsection] key = 1 new = 2 [section "SubSection"] new = 3 (ie notice how it did _not_ replace the old "section.subsection.new", because of how this is a _different_ subsection due to the subsectin rules, and notice how it will always create the new subsection with quotes). So you _can_ continue to use the old subsection format, and it will work the way it always did, except for the fact that it would now be deprecated (if there were any multi-level users, which I don't think there are), and it is now case-sensitive (which makes sense in the new format with "" around it, but is illogical in the old deprecated one). Hey, it was fun, and the only ugly part was the write-out of the quoted format. And it should be perfectly easy to use. Modulo double-quotes in branch names, you can do trivial things like git repo-config "branch.$branchname.remote" "git://git.kernel.org/..." and it will do the obvious thing. My one complaint is that I think we should add an empty line for the case where we add a new sub-section to the end of a file. That's not a new problem, but that was really the only visually ugly part I noticed during testing. You _can_ be user-friendly and machine-parseable at the same time! Linus - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| H. Peter Anvin | Re: [RFC 00/15] x86_64: Optimize percpu accesses |
| Greg Kroah-Hartman | [PATCH 008/196] Chinese: add translation of volatile-considered-harmful.txt |
| Greg KH | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Alex Chiang | [PATCH 1/4] Remove path attribute from sgi_hotplug |
git: | |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| David Miller | Re: [GIT]: Networking |
| Eric Dumazet | Re: [PATCH 3/3] Convert the UDP hash lock to RCU |
