summaryrefslogtreecommitdiff
path: root/git/objects/fun.py
diff options
context:
space:
mode:
authorYobmod <yobmod@gmail.com>2021-07-08 23:20:58 +0100
committerYobmod <yobmod@gmail.com>2021-07-08 23:20:58 +0100
commitdfbc0f42c7555b7145768774b861029c4283178c (patch)
treec7c16407fea2b36a9fc25401da81b2af3d4fe747 /git/objects/fun.py
parentd344abf5594bebe0147feaba7e87c0079d28374f (diff)
downloadgitpython-dfbc0f42c7555b7145768774b861029c4283178c.tar.gz
Fix traverse_trees_recursive() again
Diffstat (limited to 'git/objects/fun.py')
-rw-r--r--git/objects/fun.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/git/objects/fun.py b/git/objects/fun.py
index 2abd7b09..cb323afb 100644
--- a/git/objects/fun.py
+++ b/git/objects/fun.py
@@ -144,7 +144,7 @@ def _to_full_path(item: EntryTupOrNone, path_prefix: str) -> EntryTupOrNone:
def traverse_trees_recursive(odb: 'GitCmdObjectDB', tree_shas: Sequence[Union[bytes, None]],
- path_prefix: str) -> List[List[EntryTupOrNone]]:
+ path_prefix: str) -> List[tuple[EntryTupOrNone, ...]]:
"""
:return: list of list with entries according to the given binary tree-shas.
The result is encoded in a list
@@ -170,7 +170,7 @@ def traverse_trees_recursive(odb: 'GitCmdObjectDB', tree_shas: Sequence[Union[by
trees_data.append(data)
# END for each sha to get data for
- out: List[List[EntryTupOrNone]] = []
+ out: List[Tuple[EntryTupOrNone, ...]] = []
# find all matching entries and recursively process them together if the match
# 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
out.extend(traverse_trees_recursive(
odb, [((ei and ei[0]) or None) for ei in entries], path_prefix + name + '/'))
else:
- out.append([_to_full_path(e, path_prefix) for e in entries])
+ out.append(tuple(_to_full_path(e, path_prefix) for e in entries))
# END handle recursion
# finally mark it done