Dedup dotter toml with decl macros - #223
Open
viktorashi wants to merge 8 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Adds support for loading global and repository-level dotter.toml settings and merging them into CLI-derived options, reducing duplicated configuration while keeping command-line flags authoritative.
Changes:
- Introduces
DotterSettings(TOML-deserializable) plusload_settings_fileand merge logic inget_options(). - Loads a global settings file from the platform config dir and optionally
cds into a configured repo before reading a repo-localdotter.toml. - Adds the
dirsdependency to locate the platform config directory.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/args.rs |
Adds settings loading/merging (TOML + clap matches) and new helper macro/types. |
Cargo.toml |
Adds dirs dependency needed for platform config-dir lookup. |
Cargo.lock |
Locks transitive dependency changes for adding dirs. |
馃挕 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+148
to
+154
| fn load_settings_file(path: &std::path::Path) -> Option<DotterSettings> { | ||
| if let Ok(content) = std::fs::read_to_string(path) { | ||
| toml::from_str(&content).ok() | ||
| } else { | ||
| None | ||
| } | ||
| } |
| matches, | ||
| repo_settings, | ||
| global_settings, | ||
| [noconfirm, quiet, diff_context_lines, verbosity] |
Comment on lines
+8
to
+9
| type QuietType= bool; | ||
| type DiffContextLinesType= usize; |
viktorashi
force-pushed
the
dedup-dotter-toml-with-decl-macros
branch
from
August 9, 2026 23:36
5a684d6 to
0ff72df
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
just some stamping in place of