From 972a8b84bb4a3adec6322219c11370e48824404e Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Tue, 20 Oct 2009 10:48:31 +0200 Subject: Added slots to Repo type to be sure we do not accidentally set values on it, and to be more efficient of course ;) TODO: Added info about possible config improvement --- TODO | 7 +++++++ lib/git/repo.py | 1 + 2 files changed, 8 insertions(+) diff --git a/TODO b/TODO index 3b9ef460..cda7bf20 100644 --- a/TODO +++ b/TODO @@ -15,6 +15,13 @@ General * References should be parsed 'manually' to get around command invocation, but be sure to be able to read packed refs. +Config +------ +* Expand .get* methods of GitConfigParser to support default value. If it is not None, + it will be returned instead of raising. This way the class will be much more usable, + and ... I truly hate this config reader as it is so 'old' style. Its not even a new-style + class yet showing that it must be ten years old. + Docs ---- Overhaul docs - check examples, check looks, improve existing docs diff --git a/lib/git/repo.py b/lib/git/repo.py index 3efefd9c..898b0f30 100644 --- a/lib/git/repo.py +++ b/lib/git/repo.py @@ -42,6 +42,7 @@ class Repo(object): the log. """ DAEMON_EXPORT_FILE = 'git-daemon-export-ok' + __slots__ = ( "wd", "path", "_bare", "git" ) # precompiled regex re_whitespace = re.compile(r'\s+') -- cgit v1.2.3