From db1f2d29a9f01d2ce387adc3aeed475b7d7087df Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Thu, 14 Jan 2016 15:09:35 +0800 Subject: [PATCH] Exclude VCS files from file tree .git, .svn, .hg --- file/files.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/file/files.go b/file/files.go index 47fbd46..6d8c936 100644 --- a/file/files.go +++ b/file/files.go @@ -621,8 +621,8 @@ func listFiles(dirname string) []string { } if fio.IsDir() { - // exclude the .git direcitory - if ".git" == fio.Name() { + // exclude the .git, .svn, .hg direcitory + if ".git" == fio.Name() || ".svn" == fio.Name() || ".hg" == fio.Name() { continue }