diff options
-rw-r--r-- | TODO | 11 | ||||
-rw-r--r-- | lib/git/__init__.py | 1 | ||||
-rw-r--r-- | lib/git/cmd.py | 3 | ||||
-rw-r--r-- | lib/git/index.py | 3 | ||||
-rw-r--r-- | lib/git/remote.py | 2 |
5 files changed, 12 insertions, 8 deletions
@@ -32,12 +32,11 @@ Object 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. - - If you are at it, why not start a new project that reimplements the ConfigWriter - properly, honestly. Tune it for usability ... . +* Cache the config_reader of the repository and check whether they need to + update their information as the local file(s) have changed. Currently + we re-read all configuration data each time a config-reader is created. + In a way this leaves it to the user to actually keep the config-reader for + multiple uses, but there are cases when the user can hardly do that. Diff ---- diff --git a/lib/git/__init__.py b/lib/git/__init__.py index c7efe5ea..75eba3c9 100644 --- a/lib/git/__init__.py +++ b/lib/git/__init__.py @@ -20,6 +20,7 @@ from git.repo import Repo from git.stats import Stats from git.remote import * from git.index import * +from git.utils import LockFile, BlockingLockFile __all__ = [ name for name, obj in locals().items() if not (name.startswith('_') or inspect.ismodule(obj)) ] diff --git a/lib/git/cmd.py b/lib/git/cmd.py index 9095eb34..e361e772 100644 --- a/lib/git/cmd.py +++ b/lib/git/cmd.py @@ -218,6 +218,8 @@ class Git(object): # Wait for the process to return status = 0 + stdout_value = '' + stderr_value = '' try: if output_stream is None: stdout_value = proc.stdout.read().rstrip() # strip trailing "\n" @@ -232,6 +234,7 @@ class Git(object): stdout_value = output_stream # END stdout handling stderr_value = proc.stderr.read().rstrip() # strip trailing "\n" + # waiting here should do nothing as we have finished stream reading status = proc.wait() finally: diff --git a/lib/git/index.py b/lib/git/index.py index 334e84aa..df633ccd 100644 --- a/lib/git/index.py +++ b/lib/git/index.py @@ -21,7 +21,7 @@ import git.diff as diff from errors import GitCommandError from git.objects import Blob, Tree, Object, Commit -from git.utils import SHA1Writer, LazyMixin, ConcurrentWriteOperation, join_path_native, BlockingLockFile +from git.utils import SHA1Writer, LazyMixin, ConcurrentWriteOperation, join_path_native class CheckoutError( Exception ): @@ -914,6 +914,7 @@ class IndexFile(LazyMixin, diff.Diffable): entries_added = list() paths, entries = self._preprocess_add_items(items) + # HANDLE PATHS if paths: # to get suitable progress information, pipe paths to stdin diff --git a/lib/git/remote.py b/lib/git/remote.py index 1e2e42fa..dc70309b 100644 --- a/lib/git/remote.py +++ b/lib/git/remote.py @@ -29,7 +29,7 @@ class _SectionConstraint(object): def __getattr__(self, attr): if attr in self._valid_attrs_: - return lambda *args: self._call_config(attr, *args) + return lambda *args, **kwargs: self._call_config(attr, *args, **kwargs) return super(_SectionConstraint,self).__getattribute__(attr) def _call_config(self, method, *args, **kwargs): |