Skip to content

Commit 369ec41

Browse files
committed
chore(gitignore): anchor the mock-backend pattern so its source dir is traversable
The bare `mock-backend` pattern matched the *directory* tests/e2e/mock-backend/, not just the binary built into it. Git will not descend into an ignored directory even for tracked files, so `git add tests/e2e/mock-backend/main.go` required -f. This was hit while working on #10970. Anchor it to the artifact's full path. The built binary stays ignored (it is also covered by tests/e2e/mock-backend/.gitignore) while the source directory becomes traversable again. Verified with `git check-ignore -v`: a new source file under tests/e2e/mock-backend/ is no longer ignored, and the binary produced by `make build-mock-backend` still is. Signed-off-by: Ettore Di Giacinto <mudler@localai.io> Assisted-by: Claude:claude-opus-4-8 [Claude Code]
1 parent 3f5339e commit 369ec41

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,12 @@ models/*
4141
test-models/
4242
test-dir/
4343
tests/e2e-aio/backends
44-
mock-backend
44+
# The mock backend binary built by `make build-mock-backend`. Anchored to its
45+
# full path: a bare `mock-backend` also matched the *directory* holding the
46+
# source, so git would not descend into it and adding a file there needed -f.
47+
# tests/e2e/mock-backend/.gitignore covers the same binary; kept here too so
48+
# the artifact stays ignored if that scoped file is ever removed.
49+
/tests/e2e/mock-backend/mock-backend
4550

4651
release/
4752

0 commit comments

Comments
 (0)