diff options
author | Yobmod <yobmod@gmail.com> | 2021-07-08 23:49:01 +0100 |
---|---|---|
committer | Yobmod <yobmod@gmail.com> | 2021-07-08 23:49:01 +0100 |
commit | 4f13b4e23526616f307370dc9a869b067e90b276 (patch) | |
tree | e389bba12640d5f1281a64167b6fc7c6ed9a198e /git/index/fun.py | |
parent | c27d2b078b515a8321b3f7f7abdcea363d8049df (diff) | |
download | gitpython-4f13b4e23526616f307370dc9a869b067e90b276.tar.gz |
fix base,ours,theirs typing
Diffstat (limited to 'git/index/fun.py')
-rw-r--r-- | git/index/fun.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/git/index/fun.py b/git/index/fun.py index cd71237d..774738db 100644 --- a/git/index/fun.py +++ b/git/index/fun.py @@ -386,13 +386,13 @@ def aggressive_tree_merge(odb, tree_shas: Sequence[bytes]) -> List[BaseIndexEntr # END handle ours else: # all three can't be None - if ours is None and theirs is not None: + if ours is None: # added in their branch - out.append(_tree_entry_to_baseindexentry(theirs, 0)) - elif theirs is None and ours is not None: + out.append(_tree_entry_to_baseindexentry(theirs, 0)) # type: ignore + elif theirs is None: # ours is not None, theirs is None # added in our branch out.append(_tree_entry_to_baseindexentry(ours, 0)) - elif ours is not None and theirs is not None: + else: # both have it, except for the base, see whether it changed if ours[0] != theirs[0] or ours[1] != theirs[1]: out.append(_tree_entry_to_baseindexentry(ours, 2)) |