git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <paolo.bonzini@gmail.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Paolo Bonzini <bonzini@gnu.org>, git@vger.kernel.org
Subject: Re: [PATCH] Add git-config --remove-section, document --rename-section
Date: Fri, 02 Mar 2007 09:17:57 +0100	[thread overview]
Message-ID: <45E7DDB5.9060009@lu.unisi.ch> (raw)
In-Reply-To: <Pine.LNX.4.63.0703012344270.22628@wbgn013.biozentrum.uni-wuerzburg.de>


> 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

  reply	other threads:[~2007-03-02  8:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-01  9:39 [PATCH] Add git-config --remove-section, document --rename-section Paolo Bonzini
2007-03-01 21:51 ` Alex Riesen
2007-03-01 22:41   ` [PATCH] add test for git-config --remove-section Johannes Schindelin
2007-03-02  8:14     ` Paolo Bonzini
2007-03-01 22:46 ` [PATCH] Add git-config --remove-section, document --rename-section Johannes Schindelin
2007-03-02  8:17   ` Paolo Bonzini [this message]
2007-03-02 11:23     ` Johannes Schindelin
2007-03-02 12:13       ` Paolo Bonzini
2007-03-02 15:44         ` Johannes Schindelin
2007-03-02 16:29           ` Paolo Bonzini
2007-03-02 20:53             ` [PATCH] git-config: document --rename-section, provide --remove-section Johannes Schindelin
2007-03-03  6:33               ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45E7DDB5.9060009@lu.unisi.ch \
    --to=paolo.bonzini@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=bonzini@gnu.org \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).