diff --git a/crates/eval/examples/find_and_replace_diff_card/base.toml b/crates/eval/examples/find_and_replace_diff_card/base.toml index 9cc9370bc6..c88298997d 100644 --- a/crates/eval/examples/find_and_replace_diff_card/base.toml +++ b/crates/eval/examples/find_and_replace_diff_card/base.toml @@ -1,3 +1,3 @@ url = "https://github.com/zed-industries/zed.git" -revision = "03ecb88fe30794873f191ddb728f597935b3101c" +revision = "38fcadf9481d018543c65f36ac3bafeba190179b" language_extension = "rs" diff --git a/crates/eval/src/example.rs b/crates/eval/src/example.rs index 058254996f..a82fbecc93 100644 --- a/crates/eval/src/example.rs +++ b/crates/eval/src/example.rs @@ -37,6 +37,8 @@ pub const WORKTREES_DIR: &str = "./crates/eval/worktrees"; const THREAD_EVENT_TIMEOUT: Duration = Duration::from_secs(60 * 2); +const ZED_REPO_URL: &str = "https://github.com/zed-industries/zed.git"; + #[derive(Clone, Debug, Deserialize)] pub struct ExampleBase { pub url: String, @@ -226,6 +228,10 @@ impl Example { .await?; } + if self.base.url == ZED_REPO_URL { + std::fs::write(worktree_path.join(".rules"), std::fs::read(".rules")?)?; + } + std::fs::create_dir_all(self.example_output_directory())?; Ok(()) @@ -637,7 +643,11 @@ impl Example { async fn repository_diff(&self) -> Result { let worktree_path = self.worktree_path(); run_git(&worktree_path, &["add", "."]).await?; - run_git(&worktree_path, &["diff", "--staged"]).await + let mut diff_args = vec!["diff", "--staged"]; + if self.base.url == ZED_REPO_URL { + diff_args.push(":(exclude).rules"); + } + run_git(&worktree_path, &diff_args).await } }