Skip to content

Commit 7218514

Browse files
committed
status: also print directory
1 parent 88ad799 commit 7218514

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/gitutils/status.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
from .status_cmd import git_status_serial, git_status_async
1717

1818

19-
def git_status(path: Path, verbose: bool) -> typing.Iterator[dict]:
19+
def git_status(path: Path, verbose: bool) -> typing.Iterator[tuple[Path, dict]]:
2020

2121
for d in gitdirs(path):
2222
repo = pygit2.Repository(d)
2323
if status := repo.status():
24-
yield status
24+
yield d, status
2525

2626

2727
def cli():
@@ -39,7 +39,8 @@ def cli():
3939
_log(P.verbose)
4040

4141
if P.method == "pygit2":
42-
for s in git_status(P.path, P.verbose):
42+
for d, s in git_status(P.path, P.verbose):
43+
print(str(d))
4344
pprint(s)
4445
elif P.method == "serial":
4546
for d in gitdirs(P.path):

0 commit comments

Comments
 (0)