Repository navigation
test: share script writer and GitConfig defaults - #86
Merged
rolandjitsu merged 2 commits intoNov 24, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #86 +/- ##
==========================================
- Coverage 98.72% 98.72% -0.01%
==========================================
Files 9 10 +1
Lines 6451 6427 -24
==========================================
- Hits 6369 6345 -24
Misses 82 82 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
profiling
force-pushed
the
profiling/share-test-script-helper
branch
from
November 23, 2026 08:12
ba99993 to
bf1df51
Compare
profiling
marked this pull request as draft
November 23, 2026 08:13
profiling
force-pushed
the
profiling/share-test-script-helper
branch
from
November 23, 2026 08:16
bf1df51 to
feb6119
Compare
git.rs and evict.rs each carried their own copy of the sh-based script writer. Move it to a crate-private test module so a fix applies to both. Assisted-by: Claude:claude-sonnet-5-5
profiling
force-pushed
the
profiling/share-test-script-helper
branch
from
November 23, 2026 08:17
feb6119 to
8aff1bc
Compare
26 test sites spelled out every GitConfig field, so adding refresh touched all of them. Build from one default per side (tests/helpers.rs, src/test_util.rs) and override only what a test needs. Assisted-by: Claude:claude-sonnet-5-5
profiling
force-pushed
the
profiling/share-test-script-helper
branch
from
November 24, 2026 01:26
8aff1bc to
0d514eb
Compare
profiling
marked this pull request as ready for review
November 24, 2026 01:28
rolandjitsu
approved these changes
Nov 24, 2026
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
Two test-only refactors that remove copy-paste across the test code. No production changes.
src/git.rsandsrc/evict.rseach had their own copy of the helper that writes a fakegitscript through a short-livedsh(the ETXTBSY fix from test(git): write fake git scripts without a held descriptor #81). It now lives in a crate-privatesrc/test_util.rs, so a future fix applies to both. The integration tests undertests/are separate crates and cannot see this module; they usetests/helpers.rs(test: write fake git scripts without a held fd #85).GitConfigfield, so addingrefreshtouched all of them. Tests now build from one default per side (tests/helpers.rs::test_git_config,src/test_util.rs::test_git_config) and override only what they need with struct update syntax. Net -148 lines.The commits are independent and can be reviewed one by one.
Verification
cargo fmt --check,cargo clippy -D warningsandcargo test --all-featurespass.git merge-tree).Generated with Claude Code