Skip to content
This repository has been archived by the owner on Jul 15, 2024. It is now read-only.

Ignore folders start with "." #201

Merged
merged 1 commit into from
Apr 15, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pkg/services/repo_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"io/ioutil"
"os"
"path/filepath"
"strings"

"github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
"github.com/argoproj/argo-cd/reposerver/apiclient"
Expand Down Expand Up @@ -99,7 +100,7 @@ func (a *argoCDService) GetDirectories(ctx context.Context, repoURL string, revi
}

fname := info.Name()
if fname == ".git" { // Skip repository metadata
if strings.HasPrefix(fname, ".") { // Skip all folders starts with "."
return filepath.SkipDir
}

Expand Down