Skip to content

Commit

Permalink
Document Repo.path. Fixes #854
Browse files Browse the repository at this point in the history
  • Loading branch information
jelmer committed Mar 20, 2022
1 parent 346fa89 commit 97268af
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
3 changes: 3 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
0.20.35 UNRELEASED

* Document the ``path`` attribute for ``Repo``.
(Jelmer Vernooij, #854)

0.20.34 2022-03-14

* Add support for multivars in configuration.
Expand Down
10 changes: 8 additions & 2 deletions dulwich/repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -1049,6 +1049,12 @@ class Repo(BaseRepo):
Note that a repository object may hold on to resources such
as file handles for performance reasons; call .close() to free
up those resources.
Attributes:
path (str): Path to the working copy (if it exists) or repository control
directory (if the repository is bare)
bare (bool): Whether this is a bare repository
"""

def __init__(self, root, object_store=None, bare=None):
Expand Down Expand Up @@ -1175,8 +1181,8 @@ def commondir(self):
For a main working tree, it is identical to controldir().
For a linked working tree, it is the control directory of the
main working tree."""

main working tree.
"""
return self._commondir

def _determine_file_mode(self):
Expand Down

0 comments on commit 97268af

Please sign in to comment.