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
| Bart Van Assche | Re: Integration of SCST in the mainstream Linux kernel |
| Greg KH | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg Kroah-Hartman | [PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO |
| Andrew Morton | Re: -mm merge plans for 2.6.23 -- sys_fallocate |
git: | |
| Gerrit Renker | [PATCH 03/37] dccp: List management for new feature negotiation |
| David Miller | [GIT]: Networking |
| Radu Rendec | htb parallelism on multi-core platforms |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
