From: Johannes Schindelin Date: Fri, 02 Mar 2007 11:23:08 GMT Subject: Re: [PATCH] Add git-config --remove-section, document --rename-section Message-ID: In-Reply-To: <45E7DDB5.9060009@lu.unisi.ch> Hi, On Fri, 2 Mar 2007, Paolo Bonzini wrote: > > 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. Of course you would have to move "int removing" and the related two lines to rename_section(), too. The diff would be shorter, and if you then rename the function to rename_or_remove_section() it becomes all clearer. Ciao, Dscho > Thanks for writing the test, having an example will make my future work > easier. You're welcome. Knowing how useful tests are is one of the good lessons of Extreme Programming... Ciao, Dscho