Skip to content

Commit ca633be

Browse files
author
Nguyen Huy Hoang
committed
feat: add missing repo.tracked_files convenience property
Signed-off-by: Nguyen Huy Hoang <181364121+huyhoang171106@users.noreply.github.com>
1 parent becccc8 commit ca633be

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

git/repo/base.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,11 @@ class Repo:
170170
"""Subclasses may easily bring in their own custom types by placing a constructor or
171171
type here."""
172172

173+
@property
174+
def tracked_files(self) -> List[str]:
175+
"""Files currently tracked by git."""
176+
return self.git.ls_files().splitlines()
177+
173178
def __init__(
174179
self,
175180
path: Optional[PathLike] = None,

0 commit comments

Comments
 (0)