Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
move git2 to workspace dependency globally
KCaverlyd85acceeecc2
diff --git a/Cargo.lock b/Cargo.lockindex 67536291770..506b104fc3a 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -3059,8 +3059,6 @@ dependencies = ["libc","libgit2-sys","log",- "openssl-probe",- "openssl-sys","url",]@@ -4023,9 +4021,7 @@ checksum = "7f3d95f6b51075fe9810a7ae22c7095f12b98005ab364d8544797a825ce946a4"dependencies = ["cc","libc",- "libssh2-sys","libz-sys",- "openssl-sys","pkg-config",]@@ -4066,20 +4062,6 @@ dependencies = ["vcpkg",]-[[package]]-name = "libssh2-sys"-version = "0.2.23"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "b094a36eb4b8b8c8a7b4b8ae43b2944502be3e59cd87687595cf6b0a71b3f4ca"-dependencies = [- "cc",- "libc",- "libz-sys",- "openssl-sys",- "pkg-config",- "vcpkg",-]-[[package]]name = "libz-sys"version = "1.1.12"diff --git a/Cargo.toml b/Cargo.tomlindex 96070658b93..b8fa79a4e35 100644--- a/Cargo.toml+++ b/Cargo.toml@@ -116,6 +116,7 @@ toml = { version = "0.5" }tree-sitter = "0.20"unindent = { version = "0.1.7" }pretty_assertions = "1.3.0"+git2 = { version = "0.15", default-features = false }tree-sitter-bash = { git = "https://github.com/tree-sitter/tree-sitter-bash", rev = "1b0321ee85701d5036c334a6f04761cdc672e64c" }tree-sitter-c = "0.20.1"diff --git a/crates/fs/Cargo.toml b/crates/fs/Cargo.tomlindex 7584dec21a9..78146c3a9db 100644--- a/crates/fs/Cargo.toml+++ b/crates/fs/Cargo.toml@@ -26,7 +26,7 @@ lazy_static.workspace = trueparking_lot.workspace = truesmol.workspace = trueregex.workspace = true-git2 = { version = "0.15", default-features = false }+git2.workspace = trueserde.workspace = trueserde_derive.workspace = trueserde_json.workspace = truediff --git a/crates/git/Cargo.toml b/crates/git/Cargo.tomlindex 8b91ee5373d..72668ba766d 100644--- a/crates/git/Cargo.toml+++ b/crates/git/Cargo.toml@@ -20,7 +20,7 @@ smol.workspace = trueparking_lot.workspace = trueasync-trait.workspace = truefutures.workspace = true-git2 = { version = "0.15", default-features = false }+git2.workspace = true[dev-dependencies]unindent.workspace = truediff --git a/crates/project/Cargo.toml b/crates/project/Cargo.tomlindex 0dc76ed54ab..ffea6646e94 100644--- a/crates/project/Cargo.toml+++ b/crates/project/Cargo.toml@@ -75,6 +75,6 @@ lsp = { path = "../lsp", features = ["test-support"] }settings = { path = "../settings", features = ["test-support"] }util = { path = "../util", features = ["test-support"] }rpc = { path = "../rpc", features = ["test-support"] }-git2 = { version = "0.15", default-features = false }+git2.workspace = truetempdir.workspace = trueunindent.workspace = truediff --git a/crates/semantic_index/Cargo.toml b/crates/semantic_index/Cargo.tomlindex 0c31f89b62a..2997f5aa0b7 100644--- a/crates/semantic_index/Cargo.toml+++ b/crates/semantic_index/Cargo.toml@@ -51,11 +51,11 @@ project = { path = "../project", features = ["test-support"] }rpc = { path = "../rpc", features = ["test-support"] }workspace = { path = "../workspace", features = ["test-support"] }settings = { path = "../settings", features = ["test-support"]}-git2 = { version = "0.15"}rust-embed = { version = "8.0", features = ["include-exclude"] }client = { path = "../client" }zed = { path = "../zed"}node_runtime = { path = "../node_runtime"}+git2.workspace = truepretty_assertions.workspace = truerand.workspace = truediff --git a/crates/semantic_index/examples/eval.rs b/crates/semantic_index/examples/eval.rsindex 546071c6f14..37da380b89f 100644--- a/crates/semantic_index/examples/eval.rs+++ b/crates/semantic_index/examples/eval.rs@@ -1,12 +1,10 @@use anyhow::{anyhow, Result};use client::{self, UserStore};-use collections::HashMap;use git2::{Object, Oid, Repository};-use gpui::{AppContext, AssetSource, AsyncAppContext, ModelHandle, Task};+use gpui::{AsyncAppContext, ModelHandle, Task};use language::LanguageRegistry;use node_runtime::RealNodeRuntime;use project::{Project, RealFs};-use rust_embed::RustEmbed;use semantic_index::embedding::OpenAIEmbeddings;use semantic_index::semantic_index_settings::SemanticIndexSettings;use semantic_index::{SearchResult, SemanticIndex};@@ -21,28 +19,6 @@ use util::http::{self};use util::paths::{self, EMBEDDINGS_DIR};use zed::languages;-#[derive(RustEmbed)]-#[folder = "../../assets"]-#[include = "fonts/**/*"]-#[include = "icons/**/*"]-#[include = "themes/**/*"]-#[include = "sounds/**/*"]-#[include = "*.md"]-#[exclude = "*.DS_Store"]-pub struct Assets;--impl AssetSource for Assets {- fn load(&self, path: &str) -> Result<std::borrow::Cow<[u8]>> {- Self::get(path)- .map(|f| f.data)- .ok_or_else(|| anyhow!("could not find asset at path \"{}\"", path))- }-- fn list(&self, path: &str) -> Vec<std::borrow::Cow<'static, str>> {- Self::iter().filter(|p| p.starts_with(path)).collect()- }-}-#[derive(Deserialize, Clone, Serialize)]struct EvaluationQuery {query: String,@@ -455,11 +431,9 @@ async fn evaluate_repo(fn main() {// Launch new repo as a new Zed workspace/project- let app = gpui::App::new(Assets).unwrap();+ let app = gpui::App::new(()).unwrap();let fs = Arc::new(RealFs);let http = http::client();- let user_settings_file_rx =- watch_config_file(app.background(), fs.clone(), paths::SETTINGS.clone());let http_client = http::client();init_logger();@@ -475,7 +449,6 @@ fn main() {.set_default_settings(default_settings().as_ref(), cx).unwrap();cx.set_global(store);- handle_settings_file_changes(user_settings_file_rx, cx);// Initialize Languageslet login_shell_env_loaded = Task::ready(());diff --git a/crates/util/Cargo.toml b/crates/util/Cargo.tomlindex 8d9594fbeb8..6ab76b08505 100644--- a/crates/util/Cargo.toml+++ b/crates/util/Cargo.toml@@ -25,10 +25,10 @@ rust-embed.workspace = truetempdir = { workspace = true, optional = true }serde.workspace = trueserde_json.workspace = true-git2 = { version = "0.15", default-features = false, optional = true }+git2 = { workspace = true, optional = true }dirs = "3.0"take-until = "0.2.0"[dev-dependencies]tempdir.workspace = true-git2 = { version = "0.15", default-features = false }+git2.workspace = true