chore: ignore stray log files in the repository root - #382
Conversation
An MCP server run in the working directory left a 305 KB valkey-mcp-server.log in the repo root, where it showed as untracked and could be swept in by `git add -A`. Safe to ignore broadly: no .log file is tracked today, and unic writes its own log outside the repository — internal/log/log.go resolves logDir() to $XDG_CONFIG_HOME/unic/logs, falling back to ~/.config. Closes #381
|
Warning Review limit reachedNext included review available in 45 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Repository: DevopsArtFactory/unic/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
This PR correctly adds *.log to .gitignore to prevent stray tool logs from being tracked. The change is well-justified and safe:
- No
.logfiles are currently tracked in the repository - unic's own logs are written outside the repo to
~/.config/unic/logs/ - The rule has been validated with
git check-ignore
No blocking issues found. This is ready to merge.
You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.
Summary
An MCP server run in the working directory left a 305 KB
valkey-mcp-server.login the repo root. It showed as untracked andgit add -Awould have committed it.Why the broad rule is safe here
A blanket
*.logcan hide files someone meant to commit, so I checked both directions before reaching for it:git ls-files '*.log'is empty, so this changes nothing about existing history. (A rule cannot untrack a tracked file anyway — worth confirming there were none rather than assuming.)internal/log/log.goresolveslogDir()to$XDG_CONFIG_HOME/unic/logs, falling back to~/.config, and writesunic.logthere. The rule never applies to it.So the only thing this catches is exactly the class of file that prompted it.
Validation
Created
valkey-mcp-server.logand a secondsome-tool.login a clean tree:go build ./...andgo test ./...pass, though neither exercises this file.Closes #381