Skip to content

Commit d5e763e

Browse files
committed
Fix 'Tree' object has no attribute '_name' when submodule path is normal path
1 parent 91b464c commit d5e763e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: git/objects/submodule/base.py

+4
Original file line numberDiff line numberDiff line change
@@ -1402,6 +1402,10 @@ def iter_items(
14021402
# END handle keyerror
14031403
# END handle critical error
14041404

1405+
# Make sure we are looking at a submodule object
1406+
if type(sm) != git.objects.submodule.base.Submodule:
1407+
continue
1408+
14051409
# fill in remaining info - saves time as it doesn't have to be parsed again
14061410
sm._name = n
14071411
if pc != repo.commit():

0 commit comments

Comments
 (0)