Conversation
- Create src/config.rs with Config struct and Config::load() method - Support config locations: $GITCLAW_CONFIG, ./.gitclaw.toml, ~/.config/gitclaw/config.toml, ~/.gitclaw.toml - Config schema: install_dir, github_token, download.*, output.* - Update Cargo.toml: add dirs 5, toml 0.8, atty 0.2 - Update main.rs to load config on startup and merge with CLI args - Update github.rs and install.rs to use config - Add comprehensive tests in tests/config.rs (21 tests) - All tests pass, clippy clean, fmt applied
- Add src/config.rs with Config struct - Support multiple config locations (env, local, XDG, legacy) - Config schema: install_dir, github_token, download/output prefs - Merge configs with proper precedence - Add unit tests for config loading
- Add src/config.rs with full Config struct - Support env var, local, XDG, legacy config locations - Proper Default impls for DownloadConfig, OutputConfig - 10 integration tests for config loading and merging - All 84+ tests passing
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.
Implements Feature 1 of v0.2.0: Configuration file support.
Changes
New module: src/config.rs
$GITCLAW_CONFIGenv var.gitclaw.toml(project-local)~/.config/gitclaw/config.toml(XDG)~/.gitclaw.toml(legacy)Config schema
install_dir: Installation directory (default:~/.gitclaw/bin)github_token: Optional GitHub API tokendownload.show_progress: Show progress bars (default: true)download.prefer_strip: Strip directory components (default: true)download.verify_checksums: Verify checksums (default: true)output.color: Color mode: auto/always/never (default: auto)output.quiet: Suppress output (default: false)output.verbose: Verbose output (default: false)Tests
Verification
cargo test: 84 passed, 2 ignoredcargo clippy: cleancargo fmt: cleanReady for review!