From 3dec12de2024ccbde94bd8b581c0397743f76bae Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Wed, 3 Jul 2024 07:35:01 +0100 Subject: [PATCH] refactor: cli don't depend directly on git crate --- README.md | 1 - crates/cli/Cargo.toml | 1 - crates/cli/src/main.rs | 2 +- crates/server/src/lib.rs | 2 ++ 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6b4ff8e3..86ae991c 100644 --- a/README.md +++ b/README.md @@ -386,7 +386,6 @@ The following diagram shows the dependency between the crates that make up `git- stateDiagram-v2 cli --> server - cli --> git file_watcher_actor --> config file_watcher_actor --> actor_macros diff --git a/crates/cli/Cargo.toml b/crates/cli/Cargo.toml index 2cdc6e80..3a975100 100644 --- a/crates/cli/Cargo.toml +++ b/crates/cli/Cargo.toml @@ -5,7 +5,6 @@ edition = { workspace = true } [dependencies] git-next-server = { workspace = true } -git-next-git = { workspace = true } # CLI parsing clap = { workspace = true } diff --git a/crates/cli/src/main.rs b/crates/cli/src/main.rs index 8ec44296..68e0d08a 100644 --- a/crates/cli/src/main.rs +++ b/crates/cli/src/main.rs @@ -29,7 +29,7 @@ enum Server { fn main() { let fs = fs::new(PathBuf::default()); let net = Network::new_real(); - let repo = git_next_git::repository::real(); + let repo = git_next_server::repo(); let commands = Commands::parse(); match commands.command { diff --git a/crates/server/src/lib.rs b/crates/server/src/lib.rs index 3f6960aa..54ed444d 100644 --- a/crates/server/src/lib.rs +++ b/crates/server/src/lib.rs @@ -8,6 +8,8 @@ use std::path::PathBuf; use tracing::{error, info}; use tracing_subscriber::EnvFilter; +pub use git_next_git::repository::real as repo; + pub fn init(fs: FileSystem) { let file_name = "git-next-server.toml"; let pathbuf = PathBuf::from(file_name);