From 546d6ad60347fae1a886e40c81da756df9879588 Mon Sep 17 00:00:00 2001 From: Steve Streeting Date: Tue, 1 Nov 2016 10:23:55 +0000 Subject: [PATCH] Exclude all nested git repos --- tools/filetools.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/filetools.go b/tools/filetools.go index 0316b670..ee41a983 100644 --- a/tools/filetools.go +++ b/tools/filetools.go @@ -226,7 +226,8 @@ func FastWalkWithExcludeFiles(dir, excludeFilename string, // FastWalkGitRepo behaves like FastWalkWithExcludeFiles, preconfigured to ignore // the git repo itself (.git) and to load exclude patterns from .gitignore func FastWalkGitRepo(dir string) (<-chan FastWalkInfo, <-chan error) { - excludePaths := []string{".git"} + // Ignore all git metadata including subrepos + excludePaths := []string{filepath.Join("*", ".git")} return FastWalkWithExcludeFiles(dir, ".gitignore", nil, excludePaths) }