Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
git: Use self.git_binary_path instead raw git string (#37757)
Jakub Konkac3d065cecc10
diff --git a/crates/git/src/repository.rs b/crates/git/src/repository.rsindex fd12dafa985..d171743e99a 100644--- a/crates/git/src/repository.rs+++ b/crates/git/src/repository.rs@@ -1205,9 +1205,10 @@ impl GitRepository for RealGitRepository {env: Arc<HashMap<String, String>>,) -> BoxFuture<'_, Result<()>> {let working_directory = self.working_directory();+ let git_binary_path = self.git_binary_path.clone();self.executor.spawn(async move {- let mut cmd = new_smol_command("git");+ let mut cmd = new_smol_command(&git_binary_path);cmd.current_dir(&working_directory?).envs(env.iter()).args(["stash", "push", "--quiet"])@@ -1229,9 +1230,10 @@ impl GitRepository for RealGitRepository {fn stash_pop(&self, env: Arc<HashMap<String, String>>) -> BoxFuture<'_, Result<()>> {let working_directory = self.working_directory();+ let git_binary_path = self.git_binary_path.clone();self.executor.spawn(async move {- let mut cmd = new_smol_command("git");+ let mut cmd = new_smol_command(&git_binary_path);cmd.current_dir(&working_directory?).envs(env.iter()).args(["stash", "pop"]);@@ -1256,9 +1258,10 @@ impl GitRepository for RealGitRepository {env: Arc<HashMap<String, String>>,) -> BoxFuture<'_, Result<()>> {let working_directory = self.working_directory();+ let git_binary_path = self.git_binary_path.clone();self.executor.spawn(async move {- let mut cmd = new_smol_command("git");+ let mut cmd = new_smol_command(&git_binary_path);cmd.current_dir(&working_directory?).envs(env.iter()).args(["commit", "--quiet", "-m"])@@ -1302,7 +1305,7 @@ impl GitRepository for RealGitRepository {let executor = cx.background_executor().clone();async move {let working_directory = working_directory?;- let mut command = new_smol_command("git");+ let mut command = new_smol_command(&self.git_binary_path);command.envs(env.iter()).current_dir(&working_directory)@@ -1333,7 +1336,7 @@ impl GitRepository for RealGitRepository {let working_directory = self.working_directory();let executor = cx.background_executor().clone();async move {- let mut command = new_smol_command("git");+ let mut command = new_smol_command(&self.git_binary_path);command.envs(env.iter()).current_dir(&working_directory?)@@ -1359,7 +1362,7 @@ impl GitRepository for RealGitRepository {let remote_name = format!("{}", fetch_options);let executor = cx.background_executor().clone();async move {- let mut command = new_smol_command("git");+ let mut command = new_smol_command(&self.git_binary_path);command.envs(env.iter()).current_dir(&working_directory?)