Expand description
Adding drep.toml to the repository’s .gitignore.
Whether the config belongs in version control is a judgement, not a fact.
It names an endpoint, a model and a protocol - shareable, and worth sharing
when a team wants one gate reviewing with one model - but it is also a
personal choice of provider that a collaborator may not have a plan for.
Since 2.1 the key is not in the file at all (it lives in the user-level
auth store), so this is a preference rather than a safety requirement, and
drep init asks rather than deciding.
§Why this is not one writeln!
Two states make a naive append useless, and both are silent:
- Already ignored. By this exact path, by a glob, or by a parent directory’s rule. Appending again is a duplicate line that never changes behaviour.
- Already tracked.
.gitignorehas no effect on a file git already tracks. Appending there looks like it worked,git statuskeeps showing the file, and nothing explains why. The fix isgit rm --cached, so that is what gets reported.
Both are answered by asking git rather than by parsing .gitignore, which
is the only way to get glob and parent-directory rules right.
Enums§
- Outcome
- What
ensuredid, so the caller can report it precisely.