Merged
Conversation
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #25 +/- ##
==========================================
+ Coverage 91.15% 92.26% +1.11%
==========================================
Files 37 33 -4
Lines 1029 983 -46
Branches 243 230 -13
==========================================
- Hits 938 907 -31
+ Misses 18 13 -5
+ Partials 73 63 -10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Add getStagedPaths, getUntrackedPaths, isNewFileInRepo, fileExistsAtRef, getHeadMessage, isHeadEmptyVsParent, commit, push, and discardFiles to the GitClient interface. Export getStagedFilesInGroup as a pure helper so callers don't need to import from src/git/.
Move looksLikeNoUpstream and all git operations (staged paths, untracked paths, file existence checks, HEAD info, commit, push with upstream fallback, discard) from src/git/* into GitCliClient. GitCliClient is now the single authoritative git adapter.
All registration modules now call git operations through the injected GitClient (deps.git) instead of importing free functions from src/git/. Removes direct coupling to the old parallel git execution system.
Replace runGit/getUntrackedPaths free-function imports in use cases with GitClient method calls. Introduce a GitPort type in handleNewFilesCreated to keep the dependency explicit without coupling to the full interface.
Strip runGit, runGitCapture, and getUntrackedPaths from process.ts — these are now handled by GitCliClient. Delete the entire src/git/ directory (head.ts, push.ts, refs.ts, staged.ts) as all logic has been migrated.
Add tests for all new GitCliClient methods (getStagedPaths, getUntrackedPaths, isNewFileInRepo, fileExistsAtRef, getHeadMessage, isHeadEmptyVsParent, commit, push, discardFiles). Remove src/test/unit/git/ tests for deleted modules. Update process.test.ts and reconcileWithGitStatus.test.ts to match the new structure. Fix mockExecFileWithRouter to propagate error messages correctly.
5fbb6d3 to
d7a3192
Compare
Add missing methods (getStagedPaths, getUntrackedPaths, isNewFileInRepo, fileExistsAtRef, getHeadMessage, isHeadEmptyVsParent, commit, push, discardFiles, stashListFiles) to the four test files whose makeGit factory is strictly typed as GitClient.
runCmdCapture, runCmd, and runGhCapture were no longer referenced anywhere after git operations were consolidated into GitCliClient.
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.
No description provided.