refactor: decompose git/operations.rs into focused modules#376
Merged
Conversation
Owner
Author
PR Review SummaryCritical Issues (0 found)None. Important Issues (0 found)None. Suggestions (0 found)None. Strengths
Documentation UpdatesNone needed — all docs reference the VerdictREADY TO MERGE Clean refactoring that improves maintainability without behavioral changes. All validations pass ( |
Split the 2,280-line operations.rs into 5 files by responsibility: - naming.rs: path sanitization, branch names, project ID generation - validation.rs: branch/arg validation, git directory checks - status.rs: diff stats, worktree status, git stats aggregation - health.rs: branch health metrics with pub(super) shared helpers - overlaps.rs: file overlap detection across kilds Updated mod.rs with re-exports so callers use cleaner paths (e.g. crate::git::kild_branch_name instead of crate::git::operations::kild_branch_name). Tests moved with their code, no behavioral changes.
694dbe2 to
6f357b8
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.
Summary
git/operations.rsinto 5 focused files by responsibility:naming.rs,validation.rs,status.rs,health.rs,overlaps.rsmod.rswith re-exports for cleaner caller paths (crate::git::kild_branch_nameinstead ofcrate::git::operations::kild_branch_name)kild-coreandkildcrates — zero references togit::operationsremainPure code movement refactor. No behavioral changes; all tests pass with identical assertions.
Closes #331
Test plan
cargo fmt --checkpassescargo clippy --all -- -D warningspasses (0 warnings)cargo test --allpasses (782 kild-core tests, all crates green)cargo build --allsucceedsgrep -r "git::operations" crates/returns nothing