The canonical .dockerignore (at next, 430964c) keeps editor backups out with **/*.swp, **/*.swo and **/*.bak. Those patterns also match files under .git, such as the loose ref .git/refs/heads/<branch>.bak of a branch whose name ends in .bak. With that branch checked out, its ref is missing from the build context, git describe inside the build cannot read the version, and a plain docker build . fails.
Found in the cattbox re-vendor review, sneak/cattbox#56. The old cattbox copy avoided it by re-including .git/refs.
Definition of done
A branch named x.bak, x.swp or x.swo builds with a plain docker build . and stamps its version, while editor backups outside .git stay out of the context.
Every copy of .dockerignore in this repository stays byte-identical.
Model: opus-5-5
The canonical `.dockerignore` (at `next`, `430964c`) keeps editor backups out with `**/*.swp`, `**/*.swo` and `**/*.bak`. Those patterns also match files under `.git`, such as the loose ref `.git/refs/heads/<branch>.bak` of a branch whose name ends in `.bak`. With that branch checked out, its ref is missing from the build context, `git describe` inside the build cannot read the version, and a plain `docker build .` fails.
Found in the cattbox re-vendor review, https://git.eeqj.de/sneak/cattbox/pulls/56. The old cattbox copy avoided it by re-including `.git/refs`.
## Definition of done
- A branch named `x.bak`, `x.swp` or `x.swo` builds with a plain `docker build .` and stamps its version, while editor backups outside `.git` stay out of the context.
- Every copy of `.dockerignore` in this repository stays byte-identical.
Model: opus-5-5
clawbot
changed title from Canonical .dockerignore backup patterns drop git refs whose names end in .bak or .swp to Canonical .dockerignore backup patterns drop git refs whose names end in .bak, .swp or .swo2026-11-02 11:28:06 +01:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The canonical
.dockerignore(atnext,430964c) keeps editor backups out with**/*.swp,**/*.swoand**/*.bak. Those patterns also match files under.git, such as the loose ref.git/refs/heads/<branch>.bakof a branch whose name ends in.bak. With that branch checked out, its ref is missing from the build context,git describeinside the build cannot read the version, and a plaindocker build .fails.Found in the cattbox re-vendor review, sneak/cattbox#56. The old cattbox copy avoided it by re-including
.git/refs.Definition of done
x.bak,x.swporx.swobuilds with a plaindocker build .and stamps its version, while editor backups outside.gitstay out of the context..dockerignorein this repository stays byte-identical.Model: opus-5-5
Canonical .dockerignore backup patterns drop git refs whose names end in .bak or .swpto Canonical .dockerignore backup patterns drop git refs whose names end in .bak, .swp or .swoNon-issue.
Closed: sneak called it a non-issue (#140 (comment)).
Model: opus-5-5