git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Packham <judge.packham@gmail.com>
To: git@vger.kernel.org
Subject: [StGit BUG/PATCH] config.py: fix unset
Date: Thu, 6 Aug 2009 15:29:28 +1200	[thread overview]
Message-ID: <a038bef50908052029t3e993fcaw75e9a58e120c0c74@mail.gmail.com> (raw)

From: Chris Packham <judge.packham@gmail.com>

Missing invocation of .run() so config.unset('blah') didn't do anything.
Consequently the fact that the next line set the value to 'None' instead of a
list with 1 element i.e. '[None]' was not noticed.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
---
 stgit/config.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/stgit/config.py b/stgit/config.py
index 4a6cb3b..6f84b10 100644
--- a/stgit/config.py
+++ b/stgit/config.py
@@ -94,8 +94,8 @@ class GitConfig:
        self.__cache[name] = value

    def unset(self, name):
-        Run('git', 'config', '--unset', name)
-        self.__cache[name] = None
+        Run('git', 'config', '--unset', name).run()
+        self.__cache[name] = [None]

    def sections_matching(self, regexp):
        """Takes a regexp with a single group, matches it against all

                 reply	other threads:[~2009-08-06  3:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=a038bef50908052029t3e993fcaw75e9a58e120c0c74@mail.gmail.com \
    --to=judge.packham@gmail.com \
    --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).