Remove git2 dependency.
This commit is contained in:
parent
2d8a362cbe
commit
34a00fe7f4
2 changed files with 6 additions and 5 deletions
|
@ -37,7 +37,6 @@ clippy_lints = { version = "0.0.212", path = "clippy_lints" }
|
||||||
regex = "1"
|
regex = "1"
|
||||||
semver = "0.9"
|
semver = "0.9"
|
||||||
rustc_tools_util = { version = "0.2.0", path = "rustc_tools_util"}
|
rustc_tools_util = { version = "0.2.0", path = "rustc_tools_util"}
|
||||||
git2 = { version = "0.12", optional = true }
|
|
||||||
tempfile = { version = "3.1.0", optional = true }
|
tempfile = { version = "3.1.0", optional = true }
|
||||||
lazy_static = "1.0"
|
lazy_static = "1.0"
|
||||||
|
|
||||||
|
@ -60,4 +59,4 @@ rustc_tools_util = { version = "0.2.0", path = "rustc_tools_util"}
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
deny-warnings = []
|
deny-warnings = []
|
||||||
integration = ["git2", "tempfile"]
|
integration = ["tempfile"]
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
#![cfg(feature = "integration")]
|
#![cfg(feature = "integration")]
|
||||||
|
|
||||||
use git2::Repository;
|
|
||||||
|
|
||||||
use std::env;
|
use std::env;
|
||||||
use std::process::Command;
|
use std::process::Command;
|
||||||
|
|
||||||
|
@ -19,7 +17,11 @@ fn integration_test() {
|
||||||
.path()
|
.path()
|
||||||
.join(crate_name);
|
.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 root_dir = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR"));
|
||||||
let target_dir = std::path::Path::new(&root_dir).join("target");
|
let target_dir = std::path::Path::new(&root_dir).join("target");
|
||||||
|
|
Loading…
Add table
Reference in a new issue