diff options
| author | Yobmod <yobmod@gmail.com> | 2021-07-08 22:49:34 +0100 |
|---|---|---|
| committer | Yobmod <yobmod@gmail.com> | 2021-07-08 22:49:34 +0100 |
| commit | 4333dcb182da3c9f9bd2c358bdf38db278cab557 (patch) | |
| tree | 86127879e5d8cd7fb6ab7affcb247e5cd591f4a8 /git/index | |
| parent | 1533596b03ef07b07311821d90de3ef72abba5d6 (diff) | |
| download | gitpython-4333dcb182da3c9f9bd2c358bdf38db278cab557.tar.gz | |
Mmmmm
Diffstat (limited to 'git/index')
| -rw-r--r-- | git/index/fun.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/git/index/fun.py b/git/index/fun.py index 382e3d44..f1b05f16 100644 --- a/git/index/fun.py +++ b/git/index/fun.py @@ -61,7 +61,7 @@ if TYPE_CHECKING: def is_three_entry_list(inp) -> TypeGuard[List['EntryTupOrNone']]: - return isinstance(inp, list) and len(inp) == 3 + return isinstance(inp, (tuple, list)) and len(inp) == 3 # ------------------------------------------------------------------------------------ @@ -339,10 +339,9 @@ def aggressive_tree_merge(odb, tree_shas: Sequence[bytes]) -> List[BaseIndexEntr raise ValueError("Cannot handle %i trees at once" % len(tree_shas)) # three trees - for three_entries in traverse_trees_recursive(odb, tree_shas, ''): - - assert is_three_entry_list(three_entries) - base, ours, theirs = three_entries + for entryo in traverse_trees_recursive(odb, tree_shas, ''): + assert is_three_entry_list(entryo), f"{type(entryo)=} and {len(entryo)=}" # type:ignore + base, ours, theirs = entryo if base is not None: # base version exists if ours is not None: |
