Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
eval: Fix git revision existence check (#28959)
Oleksiy Syvokon6dd622d6c329
diff --git a/crates/eval/src/example.rs b/crates/eval/src/example.rsindex 0e0a385bcb5..0968b62423f 100644--- a/crates/eval/src/example.rs+++ b/crates/eval/src/example.rs@@ -140,9 +140,12 @@ impl Example {pub async fn setup(&mut self) -> Result<()> {let repo_path = repo_path_for_url(&self.base.url);- let revision_exists = run_git(&repo_path, &["rev-parse", "--verify", &self.base.revision])- .await- .is_ok();+ let revision_exists = run_git(+ &repo_path,+ &["rev-parse", &format!("{}^{{commit}}", self.base.revision)],+ )+ .await+ .is_ok();if !revision_exists {println!(