Skip to content

Commit

Permalink
Merge pull request #1645 from CosmosAtlas/main
Browse files Browse the repository at this point in the history
Fix 'Tree' object has no attribute '_name' when submodule path is normal path
  • Loading branch information
Byron committed Sep 6, 2023
2 parents 91b464c + d5e763e commit 830025b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions git/objects/submodule/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1402,6 +1402,10 @@ def iter_items(
# END handle keyerror
# END handle critical error

# Make sure we are looking at a submodule object
if type(sm) != git.objects.submodule.base.Submodule:
continue

# fill in remaining info - saves time as it doesn't have to be parsed again
sm._name = n
if pc != repo.commit():
Expand Down

0 comments on commit 830025b

Please sign in to comment.