All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <paolo.bonzini@lu.unisi.ch>
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 13:13:13 +0100	[thread overview]
Message-ID: <45E814D9.7020104@lu.unisi.ch> (raw)
In-Reply-To: <Pine.LNX.4.63.0703021220420.22628@wbgn013.biozentrum.uni-wuerzburg.de>


> 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.

It's more different than it looks like.  For example, remove_section needs this,

        if (buf[i] == '[') {
                if (section_name_match (&buf[i + 1], name)) {
		} else
			...
	}

while rename_section can use

        if (buf[i] == '[' && section_name_match (&buf[i+1], old_name)) {

and has more indenting in it.  The amount of indentation in the combined function is not makign things easier to read.

Paolo

  reply	other threads:[~2007-03-02 12:13 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
2007-03-02 11:23     ` Johannes Schindelin
2007-03-02 12:13       ` Paolo Bonzini [this message]
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=45E814D9.7020104@lu.unisi.ch \
    --to=paolo.bonzini@lu.unisi.ch \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.