Skip to content

gitignore: anchor redpanda-check to repo root#8

Open
vuldin wants to merge 1 commit into
mainfrom
gitignore-anchor-redpanda-check
Open

gitignore: anchor redpanda-check to repo root#8
vuldin wants to merge 1 commit into
mainfrom
gitignore-anchor-redpanda-check

Conversation

@vuldin
Copy link
Copy Markdown
Member

@vuldin vuldin commented May 22, 2026

Summary

  • Change the first line of .gitignore from redpanda-check to /redpanda-check so the pattern is anchored to the repo root.

Why

The unanchored redpanda-check pattern matches any path component named redpanda-check at any depth — which includes cmd/redpanda-check/, the directory holding main.go. The intent of this ignore entry is the goreleaser-built binary that lands at the repo root.

Discovered while editing cmd/redpanda-check/main.go for PR #7: git add cmd/redpanda-check/main.go errored with The following paths are ignored by one of your .gitignore files: cmd/redpanda-check, requiring git add -f to bypass.

Test plan

  • git check-ignore -v redpanda-check → matches /redpanda-check (the root binary is still ignored).
  • git check-ignore -v cmd/redpanda-check → no match (the cmd directory is no longer ignored).
  • git check-ignore -v target/dist → still matches dist/ (goreleaser output still ignored as intended).
  • git check-ignore -v resources/plugin_uploader/.venv → still matches .venv/.

The unanchored `redpanda-check` pattern was matching the cmd/redpanda-check/
directory in addition to the goreleaser-built binary at the repo root.
That forced contributors to `git add -f cmd/redpanda-check/main.go` when
editing the only source file in that directory.

Anchor the pattern with a leading slash so it only ignores the built
binary at the repo root. `cmd/redpanda-check/` is left untouched.
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