git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[StGit BUG/PATCH] config.py: fix unset

From
Chris Packham <judge.packham@gmail.com>
Date
Aug 6, 2009, 03:29 UTC
Message-ID
<a038bef50908052029t3e993fcaw75e9a58e120c0c74@mail.gmail.com>
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
Message 1 of 1 in “config.py: fix unset”
  1. config.py: fix unsetChris Packham, Aug 6, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.