We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent697702e commita38a005Copy full SHA for a38a005
TODO
@@ -32,12 +32,11 @@ Object
32
33
Config
34
------
35
-* Expand .get* methods of GitConfigParser to support default value. If it is not None,
36
- it will be returned instead of raising. This way the class will be much more usable,
37
- and ... I truly hate this config reader as it is so 'old' style. Its not even a new-style
38
- class yet showing that it must be ten years old.
39
- - If you are at it, why not start a new project that reimplements the ConfigWriter
40
- 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.
41
42
Diff
43
----
lib/git/__init__.py
@@ -20,6 +20,7 @@
20
fromgit.statsimportStats
21
fromgit.remoteimport*
22
fromgit.indeximport*
23
+fromgit.utilsimportLockFile,BlockingLockFile
24
25
__all__= [nameforname,objinlocals().items()
26
ifnot (name.startswith('_')orinspect.ismodule(obj)) ]
lib/git/cmd.py
@@ -218,6 +218,8 @@ def execute(self, command,
218
219
# Wait for the process to return
220
status=0
221
+stdout_value=''
222
+stderr_value=''
223
try:
224
ifoutput_streamisNone:
225
stdout_value=proc.stdout.read().rstrip()# strip trailing "\n"
@@ -232,6 +234,7 @@ def execute(self, command,
232
234
stdout_value=output_stream
233
235
# END stdout handling
236
stderr_value=proc.stderr.read().rstrip()# strip trailing "\n"
237
+
238
# waiting here should do nothing as we have finished stream reading
239
status=proc.wait()
240
finally:
lib/git/index.py
@@ -21,7 +21,7 @@
fromerrorsimportGitCommandError
fromgit.objectsimportBlob,Tree,Object,Commit
-fromgit.utilsimportSHA1Writer,LazyMixin,ConcurrentWriteOperation,join_path_native,BlockingLockFile
+fromgit.utilsimportSHA1Writer,LazyMixin,ConcurrentWriteOperation,join_path_native
27
classCheckoutError(Exception ):
@@ -914,6 +914,7 @@ def add(self, items, force=True, fprogress=lambda *args: None):
914
entries_added=list()
915
paths,entries=self._preprocess_add_items(items)
916
917
918
# HANDLE PATHS
919
ifpaths:
920
# to get suitable progress information, pipe paths to stdin
lib/git/remote.py
@@ -29,7 +29,7 @@ def __init__(self, config, section):
29
30
def__getattr__(self,attr):
31
ifattrinself._valid_attrs_:
-returnlambda*args:self._call_config(attr,*args)
+returnlambda*args,**kwargs:self._call_config(attr,*args,**kwargs)
returnsuper(_SectionConstraint,self).__getattribute__(attr)
def_call_config(self,method,*args,**kwargs):