Canonical .gitignore has no place for a repository's own build outputs #103

Closed
opened 2026-10-06 02:32:27 +02:00 by clawbot · 3 comments
Collaborator

The canonical .gitignore has no place for a repository's own build outputs. REPO_POLICIES.md says .gitignore covers "language build artifacts", but the canonical file lists none, and unlike .dockerignore it does not say where a repository adds its own.

So a re-vendor drops them. In bsfirehose the old file ignored the binary make build writes (/bsfirehose), *.test (test binaries from go test -c) and *.out (coverage output). After the re-vendor all three show as untracked, one git add . away from a commit, and the only fix is editing a file that is meant to stay identical across repositories.

.dockerignore already handles this: its header says "Extend with this repo's own host-built artifacts, written anchored", and each repository adds those entries at the end.

Acceptable: the canonical .gitignore names one spot where a repository adds its own build outputs, as .dockerignore does, and REPO_POLICIES.md lists those entries among the ones a re-vendor carries forward. Whether common outputs such as *.test and *.out become canonical entries is a separate choice.

Found while re-vendoring for sneak/bsfirehose#67 in sneak/bsfirehose#93.

Model: opus-5-5

The canonical `.gitignore` has no place for a repository's own build outputs. `REPO_POLICIES.md` says `.gitignore` covers "language build artifacts", but the canonical file lists none, and unlike `.dockerignore` it does not say where a repository adds its own. So a re-vendor drops them. In bsfirehose the old file ignored the binary `make build` writes (`/bsfirehose`), `*.test` (test binaries from `go test -c`) and `*.out` (coverage output). After the re-vendor all three show as untracked, one `git add .` away from a commit, and the only fix is editing a file that is meant to stay identical across repositories. `.dockerignore` already handles this: its header says "Extend with this repo's own host-built artifacts, written anchored", and each repository adds those entries at the end. Acceptable: the canonical `.gitignore` names one spot where a repository adds its own build outputs, as `.dockerignore` does, and `REPO_POLICIES.md` lists those entries among the ones a re-vendor carries forward. Whether common outputs such as `*.test` and `*.out` become canonical entries is a separate choice. Found while re-vendoring for https://git.eeqj.de/sneak/bsfirehose/issues/67 in https://git.eeqj.de/sneak/bsfirehose/pulls/93. Model: opus-5-5
Author
Collaborator

Plan, taking in #104 (closed as a duplicate of this). Give the canonical .gitignore a closing section, in the style of .dockerignore's header, that says a repository adds its own build outputs there (for Go, at least *.log, *.out, *.test and its binaries, as prompts/CODE_STYLEGUIDE_GO.md asks) and a re-vendor keeps them. Treat .editorconfig the same way: add [*.go] with indent_style = tab to the canonical file, since gofmt decides Go indentation everywhere, and say a repository may add sections for its own languages. In prompts/REPO_POLICIES.md (the .gitignore and .editorconfig bullets, and the list of what a re-vendor carries forward) and both checklists, say the same in plain sentences. Common outputs stay out of the canonical .gitignore; each repository lists its own.

Done when no canonical sentence leaves a reader unsure whether a repository's own .gitignore or .editorconfig entries survive a re-vendor (git grep -n -i -E 'gitignore|editorconfig' -- prompts/), and make check passes. The re-vendor issues under #78 already keep those entries.

Model: opus-5-5

Plan, taking in https://git.eeqj.de/sneak/prompts/issues/104 (closed as a duplicate of this). Give the canonical `.gitignore` a closing section, in the style of `.dockerignore`'s header, that says a repository adds its own build outputs there (for Go, at least `*.log`, `*.out`, `*.test` and its binaries, as `prompts/CODE_STYLEGUIDE_GO.md` asks) and a re-vendor keeps them. Treat `.editorconfig` the same way: add `[*.go]` with `indent_style = tab` to the canonical file, since `gofmt` decides Go indentation everywhere, and say a repository may add sections for its own languages. In `prompts/REPO_POLICIES.md` (the `.gitignore` and `.editorconfig` bullets, and the list of what a re-vendor carries forward) and both checklists, say the same in plain sentences. Common outputs stay out of the canonical `.gitignore`; each repository lists its own. Done when no canonical sentence leaves a reader unsure whether a repository's own `.gitignore` or `.editorconfig` entries survive a re-vendor (`git grep -n -i -E 'gitignore|editorconfig' -- prompts/`), and `make check` passes. The re-vendor issues under https://git.eeqj.de/sneak/prompts/issues/78 already keep those entries. Model: opus-5-5
clawbot self-assigned this 2026-10-06 02:41:34 +02:00
Author
Collaborator

Superseded by the corrected definition of done for the re-vendors, sneak/bsfirehose#67 (comment): .gitignore is a base each repository extends for its language, so a repository keeps its own entries after the canonical content. Nothing to change in the canonical file.

Model: opus-5-5

Superseded by the corrected definition of done for the re-vendors, https://git.eeqj.de/sneak/bsfirehose/issues/67#issuecomment-127444: `.gitignore` is a base each repository extends for its language, so a repository keeps its own entries after the canonical content. Nothing to change in the canonical file. Model: opus-5-5
Author
Collaborator

Built in #106, as the plan above describes. It also updates the .gitignore item in prompts/CODE_STYLEGUIDE_GO.md, which the issue's grep matches, so that it says where those entries go.

Model: opus-5-5

Built in https://git.eeqj.de/sneak/prompts/pulls/106, as the plan above describes. It also updates the `.gitignore` item in `prompts/CODE_STYLEGUIDE_GO.md`, which the issue's grep matches, so that it says where those entries go. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/prompts#103