From b0075473705bc9154d02c2dd5c6c6d28f1635b8b Mon Sep 17 00:00:00 2001 From: Alexander Haase Date: Fri, 19 Jan 2018 19:49:55 +0100 Subject: [PATCH] Fix two-layer excludes 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. --- git_archive_all.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/git_archive_all.py b/git_archive_all.py index 046179f..31e42f2 100755 --- a/git_archive_all.py +++ b/git_archive_all.py @@ -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):