mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Merge pull request #29772 from terminalmage/issue29631
pygit2: skip submodules when traversing tree
This commit is contained in:
commit
0c65eeb82b
@ -954,6 +954,9 @@ class Pygit2(GitProvider):
|
||||
the empty directories within it in the "blobs" list
|
||||
'''
|
||||
for entry in iter(tree):
|
||||
if entry.oid not in self.repo:
|
||||
# Entry is a submodule, skip it
|
||||
continue
|
||||
blob = self.repo[entry.oid]
|
||||
if not isinstance(blob, pygit2.Tree):
|
||||
continue
|
||||
@ -1065,6 +1068,9 @@ class Pygit2(GitProvider):
|
||||
the file paths and symlink info in the "blobs" dict
|
||||
'''
|
||||
for entry in iter(tree):
|
||||
if entry.oid not in self.repo:
|
||||
# Entry is a submodule, skip it
|
||||
continue
|
||||
obj = self.repo[entry.oid]
|
||||
if isinstance(obj, pygit2.Blob):
|
||||
repo_path = os.path.join(prefix, entry.name)
|
||||
|
Loading…
Reference in New Issue
Block a user