feat(config): support non-hidden repo config file#23
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 57b9b4a3e6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if info.IsDir() { | ||
| return "", "", fmt.Errorf("repo config is a directory: %s", path) |
There was a problem hiding this comment.
Continue fallback search when preferred config path is a dir
The new probe order returns an error as soon as git-ai-commit.toml exists but is a directory, so the legacy .git-ai-commit.toml file is never considered. That regresses backward compatibility in repos where a directory with the new name is present (accidentally or from tooling), because previously a valid hidden config would load successfully; now Load() fails before trust/parse can happen.
Useful? React with 👍 / 👎.
57b9b4a to
3e6ca3c
Compare
Summary
git-ai-commit.toml(non-hidden) as repo config, with fallback to.git-ai-commit.tomlfor backward compatibilityCloses #22
Test plan
go test ./...passesTestNonHiddenRepoConfig— onlygit-ai-commit.tomlexists, verify it loadsTestNonHiddenRepoConfigPrecedence— both files exist, verify non-hidden wins.git-ai-commit.tomltests still pass (hidden fallback works)