diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2016-05-19 13:09:51 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2016-05-19 13:09:51 +0200 |
commit | 2376bd397f084902196a929171c7f7869529bffc (patch) | |
tree | c12bb1e3970cf588d25b4684d5ef8431810a207b | |
parent | 4bcc4d55baef64825b4163c6fb8526a2744b4a86 (diff) | |
download | gitpython-2376bd397f084902196a929171c7f7869529bffc.tar.gz |
Clarify costs of certain properties
Fixes #428
-rw-r--r-- | git/repo/base.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/git/repo/base.py b/git/repo/base.py index 0274c0a7..e115fd4b 100644 --- a/git/repo/base.py +++ b/git/repo/base.py @@ -254,7 +254,9 @@ class Repo(object): @property def index(self): - """:return: IndexFile representing this repository's index.""" + """:return: IndexFile representing this repository's index. + :note: This property can be expensive, as the returned ``IndexFile`` will be + reinitialized. It's recommended to re-use the object.""" return IndexFile(self) @property @@ -624,7 +626,10 @@ class Repo(object): are relative to the current working directory of the git command. :note: - ignored files will not appear here, i.e. files mentioned in .gitignore""" + ignored files will not appear here, i.e. files mentioned in .gitignore + :note: + This property is expensive, as no cache is involved. To process the result, please + consider caching it yourself.""" return self._get_untracked_files() def _get_untracked_files(self, **kwargs): |