Skip to content

Commit

Permalink
Fix two-layer excludes
Browse files Browse the repository at this point in the history
If a submodule of a submodule should be excluded, the paths didn't
match, as the current directory was already prefixed, but the
submodule's attributes file dowsn't have the path, as it doesn't know
it's a submodule.
  • Loading branch information
alehaa committed Jan 19, 2018
1 parent 92226a7 commit b007547
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions git_archive_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,10 +326,9 @@ def walk_git_files(self, repo_path=''):

if m:
submodule_path = m.group(1)
submodule_path = path.join(repo_path, submodule_path)

if self.is_file_excluded(repo_abspath, submodule_path, exclude_patterns):
continue
submodule_path = path.join(repo_path, submodule_path)

for submodule_file_path in self.walk_git_files(submodule_path):
if self.is_file_excluded(repo_abspath, submodule_file_path, exclude_patterns):
Expand Down

0 comments on commit b007547

Please sign in to comment.