about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-03-14 09:23:16 +0000
committerbors <bors@rust-lang.org>2020-03-14 09:23:16 +0000
commitceb9b7d66de723a2d312d72a796d23142bbc6329 (patch)
tree9c572971e4d9b3a0b8a309a8a653120e56bb2d15
parent2d8a362cbebf67c755c01616f17687a7fc54cd24 (diff)
parent626f2fe1cb68e88d7efe62822f4601217d2870ae (diff)
downloadrust-ceb9b7d66de723a2d312d72a796d23142bbc6329.tar.gz
rust-ceb9b7d66de723a2d312d72a796d23142bbc6329.zip
Auto merge of #5314 - ehuss:remove-git2, r=flip1995
Remove git2 dependency.

This removes the `git2` dependency (used in the integration test).  Updating git2 is awkward because both cargo and clippy have to be updated in sync, so this removes that requirement. It didn't look like it was using the git2 library for any particular reason, so this just launches the `git` executable, which should be available more or less everywhere.

This unblocks updating Cargo.

changelog: none
-rw-r--r--Cargo.toml3
-rw-r--r--tests/integration.rs8
2 files changed, 6 insertions, 5 deletions
diff --git a/Cargo.toml b/Cargo.toml
index cfcdaf22291..8421670a1a4 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -37,7 +37,6 @@ clippy_lints = { version = "0.0.212", path = "clippy_lints" }
 regex = "1"
 semver = "0.9"
 rustc_tools_util = { version = "0.2.0", path = "rustc_tools_util"}
-git2 = { version = "0.12", optional = true }
 tempfile = { version = "3.1.0", optional = true }
 lazy_static = "1.0"
 
@@ -60,4 +59,4 @@ rustc_tools_util = { version = "0.2.0", path = "rustc_tools_util"}
 
 [features]
 deny-warnings = []
-integration = ["git2", "tempfile"]
+integration = ["tempfile"]
diff --git a/tests/integration.rs b/tests/integration.rs
index 74f9a854dc1..0efbec18b4f 100644
--- a/tests/integration.rs
+++ b/tests/integration.rs
@@ -1,7 +1,5 @@
 #![cfg(feature = "integration")]
 
-use git2::Repository;
-
 use std::env;
 use std::process::Command;
 
@@ -19,7 +17,11 @@ fn integration_test() {
         .path()
         .join(crate_name);
 
-    Repository::clone(&repo_url, &repo_dir).expect("clone of repo failed");
+    let st = Command::new("git")
+        .args(&["clone", "--depth=1", &repo_url, repo_dir.to_str().unwrap()])
+        .status()
+        .expect("unable to run git");
+    assert!(st.success());
 
     let root_dir = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR"));
     let target_dir = std::path::Path::new(&root_dir).join("target");