Merged
Conversation
- Remove global flag from Switch command in CLI definition - Update switch functions to only work with local repository config - Remove all global-related logic and conditional messages - Update tests to remove global flag test case - Update documentation to reflect local-only operation The switch command now only modifies local repository configuration, which aligns with the typical use case of having different profiles for different projects.
- Remove unused open_global() method from GitConfigGit2 - Update list command to only use local configuration - Simplify codebase by removing global config access entirely This change complements the removal of the --global flag by ensuring all operations work exclusively with local repository configuration.
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
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.
Summary
• Remove --global flag from switch command to focus on local repository configuration
• Simplify CLI interface by removing an edge case that most users don't need
• Prevent accidental global configuration changes that would affect all repositories
Motivation
As discussed in #20, the
--globalflag goes against the core purpose of git-profile, which is to manage different Git configurations per project/repository. Global profile switching would affect all repositories system-wide, which is typically not the desired behavior.Changes
globalflag from Switch command in CLI definitiontest_switch_global_flagtest caseTest plan
Fixes #20
🤖 Generated with Claude Code