Skip to content

Commit dfbc0f4

Browse files
committed
Fix traverse_trees_recursive() again
1 parent d344abf commit dfbc0f4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎git/objects/fun.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def _to_full_path(item: EntryTupOrNone, path_prefix: str) -> EntryTupOrNone:
144144

145145

146146
def traverse_trees_recursive(odb: 'GitCmdObjectDB', tree_shas: Sequence[Union[bytes, None]],
147-
path_prefix: str) -> List[List[EntryTupOrNone]]:
147+
path_prefix: str) -> List[tuple[EntryTupOrNone, ...]]:
148148
"""
149149
:return: list of list with entries according to the given binary tree-shas.
150150
The result is encoded in a list
@@ -170,7 +170,7 @@ def traverse_trees_recursive(odb: 'GitCmdObjectDB', tree_shas: Sequence[Union[by
170170
trees_data.append(data)
171171
# END for each sha to get data for
172172

173-
out: List[List[EntryTupOrNone]] = []
173+
out: List[Tuple[EntryTupOrNone, ...]] = []
174174

175175
# find all matching entries and recursively process them together if the match
176176
# is a tree. If the match is a non-tree item, put it into the result.
@@ -201,7 +201,7 @@ def traverse_trees_recursive(odb: 'GitCmdObjectDB', tree_shas: Sequence[Union[by
201201
out.extend(traverse_trees_recursive(
202202
odb, [((ei and ei[0]) or None) for ei in entries], path_prefix + name + '/'))
203203
else:
204-
out.append([_to_full_path(e, path_prefix) for e in entries])
204+
out.append(tuple(_to_full_path(e, path_prefix) for e in entries))
205205

206206
# END handle recursion
207207
# finally mark it done

0 commit comments

Comments
 (0)