diff --git a/config-example.json b/config-example.json index 6275b157..8f0cadee 100644 --- a/config-example.json +++ b/config-example.json @@ -4,7 +4,7 @@ "title" : "Hound", "health-check-uri" : "/healthz", "vcs-config" : { - "git": { + "git" : { "detect-ref" : true } }, @@ -14,10 +14,10 @@ }, "AnotherGitRepo" : { "url" : "https://www.github.com/YourOrganization/RepoOne.git", - "ms-between-poll": 10000, - "exclude-dot-files": true, - "display-name": "RepoOne (dot files not indexed)", - "auto-generated-files": ["example/path"] + "ms-between-poll" : 10000, + "exclude-dot-files" : true, + "display-name" : "RepoOne (dot files not indexed)", + "auto-generated-files" : ["example/path"] }, "GitRepoWithDetectRefDisabled" : { "url" : "https://www.github.com/YourOrganization/RepoOne.git", @@ -90,16 +90,16 @@ "vcs-config" : { "ref" : "main" } - }, - "LocalRepo": { - "url": "file:///absolute/path/to/directory", - "vcs": "local", + }, + "LocalRepo" : { + "url" : "file:///absolute/path/to/directory", + "vcs" : "local", "url-pattern" : { "base-url" : "{url}/{path}" }, - "vcs-config": { - "detect-changes": false, - "ignored-files": [] + "vcs-config" : { + "watch-changes" : false, + "ignored-files" : [] } } } diff --git a/vcs/local.go b/vcs/local.go index 20417492..75a9daf3 100644 --- a/vcs/local.go +++ b/vcs/local.go @@ -19,8 +19,8 @@ func init() { } type LocalDriver struct { - DetectChanges bool `json:"detect-changes"` - IgnoredFiles []string `json:"ignored-files"` + WatchChanges bool `json:"watch-changes"` + IgnoredFiles []string `json:"ignored-files"` } func newLocal(b []byte) (Driver, error) { @@ -60,7 +60,7 @@ func myHash(files []string, open func(string) (io.ReadCloser, error)) (string, e } func (g *LocalDriver) HeadRev(dir string) (string, error) { - if !g.DetectChanges { + if !g.WatchChanges { idx := strings.LastIndex(dir, "vcs-") if idx == -1 { return "", fmt.Errorf("could not find 'vcs-' in path: %s", dir)