Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2376bd3

Browse files
committed
Clarify costs of certain properties
Fixes#428
1 parent4bcc4d5 commit2376bd3

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

‎git/repo/base.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,9 @@ def references(self):
254254

255255
@property
256256
defindex(self):
257-
""":return: IndexFile representing this repository's index."""
257+
""":return: IndexFile representing this repository's index.
258+
:note: This property can be expensive, as the returned ``IndexFile`` will be
259+
reinitialized. It's recommended to re-use the object."""
258260
returnIndexFile(self)
259261

260262
@property
@@ -624,7 +626,10 @@ def untracked_files(self):
624626
are relative to the current working directory of the git command.
625627
626628
:note:
627-
ignored files will not appear here, i.e. files mentioned in .gitignore"""
629+
ignored files will not appear here, i.e. files mentioned in .gitignore
630+
:note:
631+
This property is expensive, as no cache is involved. To process the result, please
632+
consider caching it yourself."""
628633
returnself._get_untracked_files()
629634

630635
def_get_untracked_files(self,**kwargs):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp