Fix failing tests by addressing design philosophy violations #1
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
This PR addresses the failing tests by fixing fundamental design philosophy violations in the codebase. The main issue was that the library was performing direct filesystem operations instead of using git tools (gitoxide, git2, or CLI) as intended.
Key Changes
🏗️ Design Philosophy Compliance
src/gitoxide_manager.rsstd::fs::remove_dir_all🔧 Core Implementation Fixes
add_submodulemethod to follow the fallback patternclone_with_gix,clone_with_cli, cleanup helpers)🧪 Test Harness Improvements
git submodule deinit --all -fandgit clean -fdxProgress
✅ 6 tests now passing (up from 0)
❌ 8 tests still failing (down from 14)
Passing Tests:
test_check_command_with_empty_configtest_check_command_with_no_configtest_custom_config_filetest_config_with_defaultstest_error_handling_invalid_git_repotest_error_handling_invalid_urlRemaining Issues:
The remaining 8 failing tests all have the same root cause: test remote repository setup. The error
"fatal: 'lib/test' does not have a commit checked out"indicates that the test remote repositories are being created as empty repositories without proper branch initialization.Next Steps
The remaining work involves:
Files Modified
src/gitoxide_manager.rs- Core implementation fixestests/common/mod.rs- Test harness improvementsThis represents significant progress toward a clean, philosophy-compliant implementation that properly uses git tools instead of direct filesystem operations.
💻 View my work • About Codegen