Skip to content

feat(config): auto-merge .gogo.local overlay in global mode - #57

Open
jensschulze wants to merge 1 commit into
daFish:feat/implement-local-conf-overlayfrom
jensschulze:feat/implement-local-conf-overlay
Open

feat(config): auto-merge .gogo.local overlay in global mode#57
jensschulze wants to merge 1 commit into
daFish:feat/implement-local-conf-overlayfrom
jensschulze:feat/implement-local-conf-overlay

Conversation

@jensschulze

@jensschulze jensschulze commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

You can now keep a personal .gogo.local config next to the shared .gogo. It stays uncommitted and gets merged into the effective config on every normal command, without passing -f. Useful for repos or commands only you care about: they behave like part of the project, but the shared config never learns about them.

How it works

The overlay file follows the primary config's format: .gogo.local next to a JSON .gogo, .gogo.local.yaml next to .gogo.yaml. Merge order is primary, then .gogo.local, then any -f overlays.

Two deliberate limits:

  • As soon as you pass -f, only those overlays are merged. The local file is not pulled in behind your back.
  • Write commands (project create, project import, git clone) work on the primary config alone. Your personal projects can't leak into the shared file through them.

If a .gogo.local.* file exists in the wrong format for the primary (say .gogo.local.yaml next to a JSON .gogo), gogo warns you instead of ignoring it silently.

Ignoring things in the right place

Each config layer gets its own ignore destination, so personal entries stay off everyone else's machine:

What Ignored via
The .gogo.local file itself shared .gitignore, added automatically by gogo init, project import and migrate
Project dirs from the shared config shared, tracked .gitignore
Project dirs from .gogo.local .git/info/exclude, per-repo and never committed

The .git/info/exclude entries live in a marker-delimited block that gogo owns. gogo git update keeps that block in sync with the overlay: new local projects get added, removed ones get pruned, and anything you wrote into the file yourself is left alone.

Changes

  • internal/config: local overlay resolution (LocalFilenameForPrimary), AppliedOverlays and LocalProjects on MetaConfigResult, managed-block sync for .git/info/exclude
  • internal/cli: exclude handling in git update, overlay info and warnings in validate, .gitignore wiring in init, import and migrate
  • README: new section on the personal overlay and the ignore model
  • Tests across the config, gitignore and CLI layers

@jensschulze jensschulze changed the title feat(config): auto-merge .gogo.local overlay in global mode DRAFT: feat(config): auto-merge .gogo.local overlay in global mode Sep 2, 2026
@jensschulze
jensschulze marked this pull request as draft September 2, 2026 14:50
@jensschulze
jensschulze force-pushed the feat/implement-local-conf-overlay branch from b035b8b to b473b3b Compare September 2, 2026 15:32
@jensschulze
jensschulze marked this pull request as ready for review September 2, 2026 15:33
@jensschulze jensschulze changed the title DRAFT: feat(config): auto-merge .gogo.local overlay in global mode feat(config): auto-merge .gogo.local overlay in global mode Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant