Skip to content

Commit

Permalink
Check submodules for excludes
Browse files Browse the repository at this point in the history
With this patch, git-archive-all will check a submodule's path, if its
excluded via .gitattributes and ignore the submodule, if it is.
  • Loading branch information
alehaa committed Jan 10, 2018
1 parent 0d11702 commit 7e0b051
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions git_archive_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,9 @@ def walk_git_files(self, repo_path=''):
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

for submodule_file_path in self.walk_git_files(submodule_path):
yield submodule_file_path
except IOError:
Expand Down

0 comments on commit 7e0b051

Please sign in to comment.