Skip to content

Commit 34a00fe

Browse files
committed
Remove git2 dependency.
1 parent 2d8a362 commit 34a00fe

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ clippy_lints = { version = "0.0.212", path = "clippy_lints" }
3737
regex = "1"
3838
semver = "0.9"
3939
rustc_tools_util = { version = "0.2.0", path = "rustc_tools_util"}
40-
git2 = { version = "0.12", optional = true }
4140
tempfile = { version = "3.1.0", optional = true }
4241
lazy_static = "1.0"
4342

@@ -60,4 +59,4 @@ rustc_tools_util = { version = "0.2.0", path = "rustc_tools_util"}
6059

6160
[features]
6261
deny-warnings = []
63-
integration = ["git2", "tempfile"]
62+
integration = ["tempfile"]

tests/integration.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#![cfg(feature = "integration")]
22

3-
use git2::Repository;
4-
53
use std::env;
64
use std::process::Command;
75

@@ -19,7 +17,11 @@ fn integration_test() {
1917
.path()
2018
.join(crate_name);
2119

22-
Repository::clone(&repo_url, &repo_dir).expect("clone of repo failed");
20+
let st = Command::new("git")
21+
.args(&["clone", "--depth=1", &repo_url, repo_dir.to_str().unwrap()])
22+
.status()
23+
.expect("unstable to run git");
24+
assert!(st.success());
2325

2426
let root_dir = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR"));
2527
let target_dir = std::path::Path::new(&root_dir).join("target");

0 commit comments

Comments
 (0)