refactor: move git and ssh modules into builtins/#1505
Merged
Conversation
Consolidate git and ssh implementations under builtins/ alongside their
existing builtin command modules:
- crates/bashkit/src/git/{mod,client,config}.rs ->
crates/bashkit/src/builtins/git/{mod,client,config}.rs
- crates/bashkit/src/builtins/git.rs ->
crates/bashkit/src/builtins/git/cmd.rs
- crates/bashkit/src/ssh/{mod,client,config,allowlist,handler,russh_handler}.rs ->
crates/bashkit/src/builtins/ssh/...
- crates/bashkit/src/builtins/ssh.rs ->
crates/bashkit/src/builtins/ssh/cmd.rs
Update all crate-internal paths (crate::git::* -> crate::builtins::git::*,
same for ssh) and re-export GitConfig/SshConfig/etc. through builtins.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
bashkit | ba078b0 | Commit Preview URL Branch Preview URL |
May 02 2026, 04:57 AM |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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
Consolidate the
gitandsshimplementations undercrates/bashkit/src/builtins/so each one lives next to its builtin command instead of being split across two top-level modules.crates/bashkit/src/git/{mod,client,config}.rs→crates/bashkit/src/builtins/git/{mod,client,config}.rscrates/bashkit/src/builtins/git.rs→crates/bashkit/src/builtins/git/cmd.rscrates/bashkit/src/ssh/{mod,client,config,allowlist,handler,russh_handler}.rs→crates/bashkit/src/builtins/ssh/...crates/bashkit/src/builtins/ssh.rs→crates/bashkit/src/builtins/ssh/cmd.rsAll crate-internal paths were rewritten (
crate::git::*→crate::builtins::git::*, same for ssh). The public API is unchanged —GitConfig,GitClient,SshConfig,SshClient,SshAllowlist,SshHandler,SshOutput,SshTarget,TrustedHostKeyare still exported at the crate root.specs/git-support.mdupdated to reflect the new implementation path.Why
The two modules existed in parallel with their builtin commands (
builtins/git.rs,builtins/ssh.rs). Colocating them keeps everything related to a builtin in one directory and makes the module structure consistent.Test plan
cargo fmt --checkcargo clippy --all-targets --all-features -- -D warningscargo test --lib— 2576 passed, 0 failedcargo test --all-features --tests --no-fail-fast— only failure was the network-dependentssh_supabase_connects(timeout connecting to public supabase.sh, unrelated)cargo run --features git,ssh --example git_workflow— completes successfully end-to-endGenerated by Claude Code