Exclude VCS files from file tree

.git, .svn, .hg
This commit is contained in:
Liang Ding 2016-01-14 15:09:35 +08:00
parent f4f909ee6c
commit db1f2d29a9
1 changed files with 2 additions and 2 deletions

View File

@ -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
}