Skip to content

fix(hooks): keep .maigo/ out of host repo via git exclude#2

Merged
Lee-W merged 1 commit into
mainfrom
fix/auto-ignore-maigo-artefacts
Jun 6, 2026
Merged

fix(hooks): keep .maigo/ out of host repo via git exclude#2
Lee-W merged 1 commit into
mainfrom
fix/auto-ignore-maigo-artefacts

Conversation

@Lee-W

@Lee-W Lee-W commented Jun 5, 2026

Copy link
Copy Markdown
Owner

repo_detect's SessionStart hook now ensures .maigo/ is git-ignored on every session. maigo writes plan.md, review-rubric.md, pr-comments.md and retry logs into .maigo/ at the repo root, but nothing made git ignore them, so they leaked as untracked files (and could be committed) in any consumer repo whose tracked .gitignore lacks the entry — e.g. apache/airflow.

The rule is appended to the repo's info/exclude (resolved via git rev-parse --git-path, so it works from a linked worktree) rather than the tracked .gitignore, which the host repo owns and must not be mutated. Idempotent and fail-open: skips when already ignored (global excludesfile, tracked .gitignore, or a prior run) or when cwd is not a git repo.

Docs corrected: the README previously claimed ".gitignore 已加入 .maigo/", which no code ever did.

repo_detect's SessionStart hook now ensures .maigo/ is git-ignored on
every session. maigo writes plan.md, review-rubric.md, pr-comments.md and
retry logs into .maigo/ at the repo root, but nothing made git ignore them,
so they leaked as untracked files (and could be committed) in any consumer
repo whose tracked .gitignore lacks the entry — e.g. apache/airflow.

The rule is appended to the repo's info/exclude (resolved via
`git rev-parse --git-path`, so it works from a linked worktree) rather than
the tracked .gitignore, which the host repo owns and must not be mutated.
Idempotent and fail-open: skips when already ignored (global excludesfile,
tracked .gitignore, or a prior run) or when cwd is not a git repo.

Docs corrected: the README previously claimed ".gitignore 已加入 .maigo/",
which no code ever did.
@Lee-W Lee-W merged commit 5f4c728 into main Jun 6, 2026
2 checks passed
@Lee-W Lee-W deleted the fix/auto-ignore-maigo-artefacts branch June 6, 2026 04:41
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