From 34a00fe7f47e592bc777b1a8e04df11b601b0888 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Fri, 13 Mar 2020 18:22:51 -0700 Subject: [PATCH 1/2] Remove git2 dependency. --- Cargo.toml | 3 +-- tests/integration.rs | 8 +++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index cfcdaf22291c..8421670a1a46 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 74f9a854dc1f..93dd66008f49 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("unstable 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"); From 626f2fe1cb68e88d7efe62822f4601217d2870ae Mon Sep 17 00:00:00 2001 From: Philipp Krones Date: Sat, 14 Mar 2020 10:22:49 +0100 Subject: [PATCH 2/2] Fix typo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Mateusz MikuĊ‚a --- tests/integration.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration.rs b/tests/integration.rs index 93dd66008f49..0efbec18b4f7 100644 --- a/tests/integration.rs +++ b/tests/integration.rs @@ -20,7 +20,7 @@ fn integration_test() { let st = Command::new("git") .args(&["clone", "--depth=1", &repo_url, repo_dir.to_str().unwrap()]) .status() - .expect("unstable to run git"); + .expect("unable to run git"); assert!(st.success()); let root_dir = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR"));