diff --git a/docs/config-manifest.md b/docs/config-manifest.md index ea804a5..85e0449 100644 --- a/docs/config-manifest.md +++ b/docs/config-manifest.md @@ -506,7 +506,6 @@ spec: paths: - .:/workspace exclude: - - .git/ - node_modules/ - dist/ ports: @@ -686,7 +685,6 @@ spec: paths: - .:/workspace exclude: - - .git/ - vendor/ ports: - name: grpc @@ -727,8 +725,6 @@ spec: engine: syncthing paths: - .:/workspace - exclude: - - .git/ ports: - name: app local: 8080 diff --git a/internal/cli/init_test.go b/internal/cli/init_test.go index 43fb44e..8ba802e 100644 --- a/internal/cli/init_test.go +++ b/internal/cli/init_test.go @@ -56,7 +56,7 @@ spec: if err != nil { t.Fatalf("read .stignore: %v", err) } - if string(got) != ".git/\n.venv/\nnode_modules/\n.DS_Store\n" { + if string(got) != ".venv/\nnode_modules/\n.DS_Store\n" { t.Fatalf("unexpected .stignore content %q", string(got)) } } @@ -164,7 +164,7 @@ spec: if err != nil { t.Fatalf("read .stignore: %v", err) } - if string(got) != ".git/\nbin/\ndist/\n.coverprofile\ncoverage.out\n.DS_Store\n" { + if string(got) != "bin/\ndist/\n.coverprofile\ncoverage.out\n.DS_Store\n" { t.Fatalf("unexpected .stignore content %q", string(got)) } } diff --git a/internal/cli/syncthing.go b/internal/cli/syncthing.go index 2c75a89..0c00f25 100644 --- a/internal/cli/syncthing.go +++ b/internal/cli/syncthing.go @@ -43,7 +43,7 @@ const ( // defaultSyncExcludes are written to a starter .stignore when one does not // already exist. They prevent common large or noisy directories from being // synced by default. -var defaultSyncExcludes = []string{".git/", "node_modules", "vendor", "__pycache__", ".DS_Store"} +var defaultSyncExcludes = []string{"node_modules", "vendor", "__pycache__", ".DS_Store"} const ( largeSyncWarnThreshold = 100 * 1024 * 1024 diff --git a/internal/config/template.go b/internal/config/template.go index e275aba..05aa255 100644 --- a/internal/config/template.go +++ b/internal/config/template.go @@ -33,13 +33,11 @@ var builtinNames = map[string]string{ var stignorePresets = map[string][]string{ "default": { - ".git/", ".venv/", "node_modules/", ".DS_Store", }, "python": { - ".git/", ".venv/", "__pycache__/", ".pytest_cache/", @@ -48,7 +46,6 @@ var stignorePresets = map[string][]string{ ".DS_Store", }, "node": { - ".git/", "node_modules/", ".next/", "dist/", @@ -56,7 +53,6 @@ var stignorePresets = map[string][]string{ ".DS_Store", }, "go": { - ".git/", "bin/", "dist/", ".coverprofile", @@ -64,7 +60,6 @@ var stignorePresets = map[string][]string{ ".DS_Store", }, "rust": { - ".git/", "target/", ".DS_Store", }, diff --git a/internal/config/template_test.go b/internal/config/template_test.go index 61c5d52..6774dfd 100644 --- a/internal/config/template_test.go +++ b/internal/config/template_test.go @@ -96,7 +96,7 @@ func TestBuiltinTemplateLocalIgnores(t *testing.T) { if len(patterns) == 0 { t.Fatal("expected built-in local ignore patterns") } - if patterns[0] != ".git/" { + if patterns[0] != ".venv/" { t.Fatalf("unexpected first pattern %q", patterns[0]) } if got := BuiltinTemplateLocalIgnores("./custom.yaml"); got != nil { @@ -109,8 +109,8 @@ func TestSTIgnorePreset(t *testing.T) { if len(patterns) == 0 { t.Fatal("expected go preset patterns") } - if patterns[1] != "bin/" { - t.Fatalf("unexpected go preset pattern %q", patterns[1]) + if patterns[0] != "bin/" { + t.Fatalf("unexpected go preset pattern %q", patterns[0]) } if got := STIgnorePreset("missing"); got != nil { t.Fatalf("expected nil for unknown preset, got %+v", got)