Skip to content

New CLI command for removing orphaned local branches - #144

Merged
darthsharp merged 8 commits into
mainfrom
feature/removeobsoletelocalbranches
Sep 6, 2026
Merged

darthsharp merged 8 commits into
mainfrom
feature/removeobsoletelocalbranches

Conversation

@darthsharp

Copy link
Copy Markdown
Contributor

No description provided.

- Deleted unused Markdown guidance and Azure DevOps documentation references from `.claude` and `.github` paths.
- Removed concurrency control and dependency injection patterns documentation.
- Cleaned up `.github` agent and instruction files unused in the project setup.
…unit tests

- Introduced `RemoveOrphanedLocalBranchesCommand` to delete local branches without remote counterparts interactively or automatically.
- Added `IOrphanedLocalBranchesProvider` to determine orphaned branches.
- Developed comprehensive unit tests for orphaned branch detection and command execution scenarios.
- Enhanced options with a skip fetch prune mode and an "all" option for non-interactive operations.
- Added `SonarAnalyzer.CSharp` package for enhanced static code analysis.
- Centralized NuGet package version for `SonarAnalyzer.CSharp` in `Directory.Packages.props`.
- Improved MSBuild property inheritance with imports in `Directory.Build.props` across projects.
- Suppressed specific code analysis warnings with `SuppressMessage` attributes for clarity and maintainability.
- Optimized regex usage with timeout configurations.
…s.props` to `6.9.0` and reformat file structure
…an detection

- Default mode now identifies orphaned branches using tracking information instead of name matching.
- Introduced `--include-untracked` (`-u`) option to restore legacy name-matching behavior.
- Updated `README` with usage examples for the new option.
- Refactored `OrphanedLocalBranchesProvider` with support for both tracking-based and name-matching modes.
- Added comprehensive unit tests for both detection modes and CLI integration.
- Added a test to isolate SPEC §3.1 rule 3 (`IsTracking == true`) and ensure independent validation in `GetOrphanedLocalBranches`.
- Enhanced tracking-based orphan detection to address gaps in test coverage identified in review findings.
- Introduced helper methods for logical separation of tracking-based and name-matching orphan detection.
- Refined test utilities with an overload for constructing commands, reducing redundancy in related tests.
… feature

- Removed outdated uncommitted review files related to the `feature/removeobsoletelocalbranches` implementation.
- Cleaned review artifacts no longer relevant to the current state of the branch.
@darthsharp
darthsharp merged commit 5dca98c into main Sep 6, 2026
7 checks passed
@darthsharp
darthsharp deleted the feature/removeobsoletelocalbranches branch September 6, 2026 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant