From: Paolo Bonzini Date: Fri, 02 Mar 2007 08:17:57 GMT Subject: Re: [PATCH] Add git-config --remove-section, document --rename-section Message-ID: <45E7DDB5.9060009@lu.unisi.ch> In-Reply-To: > Am I right assuming that you copied rename_section(), and modified it to > be remove_section()? Yes, after extracting section_name_match. > How about modifying rename_section() so that if new_name == NULL, it > removes the section? It's not so immediate, because rename_section has to print all the non-section lines anyway, while remove_section has to remove them too. I agree though that there is some duplicate code in getting the filename to open. Thanks for writing the test, having an example will make my future work easier. Paolo