22
33use cargo_test_support:: basic_manifest;
44use cargo_test_support:: git;
5+ use cargo_test_support:: git:: cargo_uses_gitoxide;
56use cargo_test_support:: paths;
67use cargo_test_support:: project;
78use cargo_test_support:: str;
@@ -10,6 +11,13 @@ use crate::prelude::*;
1011
1112#[ cargo_test]
1213fn sha256_gated_libgit2 ( ) {
14+ if cargo_uses_gitoxide ( ) {
15+ eprintln ! (
16+ "gitoxide hasn't yet supported sha256; ignore __CARGO_USE_GITOXIDE_INSTEAD_OF_GIT2"
17+ ) ;
18+ return ;
19+ }
20+
1321 let ( git_dep, _repo) = git:: new_sha256_repo ( "dep1" , |p| {
1422 p. file ( "Cargo.toml" , & basic_manifest ( "dep1" , "1.0.0" ) )
1523 . file ( "src/lib.rs" , "" )
@@ -120,6 +128,13 @@ Caused by:
120128
121129#[ cargo_test]
122130fn sha256_gated_with_lockfile ( ) {
131+ if cargo_uses_gitoxide ( ) {
132+ eprintln ! (
133+ "gitoxide hasn't yet supported sha256; ignore __CARGO_USE_GITOXIDE_INSTEAD_OF_GIT2"
134+ ) ;
135+ return ;
136+ }
137+
123138 let ( git_dep, _repo) = git:: new_sha256_repo ( "dep1" , |p| {
124139 p. file ( "Cargo.toml" , & basic_manifest ( "dep1" , "1.0.0" ) )
125140 . file ( "src/lib.rs" , "" )
@@ -275,6 +290,13 @@ Caused by:
275290
276291#[ cargo_test]
277292fn sha256_basic ( ) {
293+ if cargo_uses_gitoxide ( ) {
294+ eprintln ! (
295+ "gitoxide hasn't yet supported sha256; ignore __CARGO_USE_GITOXIDE_INSTEAD_OF_GIT2"
296+ ) ;
297+ return ;
298+ }
299+
278300 let ( git_dep, _repo) = git:: new_sha256_repo ( "dep1" , |p| {
279301 p. file ( "Cargo.toml" , & basic_manifest ( "dep1" , "1.0.0" ) )
280302 . file ( "src/lib.rs" , "" )
@@ -313,6 +335,13 @@ fn sha256_basic() {
313335
314336#[ cargo_test]
315337fn sha256_lockfile_and_cache_dir ( ) {
338+ if cargo_uses_gitoxide ( ) {
339+ eprintln ! (
340+ "gitoxide hasn't yet supported sha256; ignore __CARGO_USE_GITOXIDE_INSTEAD_OF_GIT2"
341+ ) ;
342+ return ;
343+ }
344+
316345 let ( git_dep, _repo) = git:: new_sha256_repo ( "dep1" , |p| {
317346 p. file ( "Cargo.toml" , & basic_manifest ( "dep1" , "1.0.0" ) )
318347 . file ( "src/lib.rs" , "" )
@@ -378,6 +407,13 @@ fn sha256_lockfile_and_cache_dir() {
378407
379408#[ cargo_test]
380409fn sha256_dep_with_rev ( ) {
410+ if cargo_uses_gitoxide ( ) {
411+ eprintln ! (
412+ "gitoxide hasn't yet supported sha256; ignore __CARGO_USE_GITOXIDE_INSTEAD_OF_GIT2"
413+ ) ;
414+ return ;
415+ }
416+
381417 let ( git_dep, repo) = git:: new_sha256_repo ( "dep1" , |p| {
382418 p. file ( "Cargo.toml" , & basic_manifest ( "dep1" , "1.0.0" ) )
383419 . file ( "src/lib.rs" , "" )
@@ -419,6 +455,13 @@ fn sha256_dep_with_rev() {
419455
420456#[ cargo_test]
421457fn sha256_update_dep ( ) {
458+ if cargo_uses_gitoxide ( ) {
459+ eprintln ! (
460+ "gitoxide hasn't yet supported sha256; ignore __CARGO_USE_GITOXIDE_INSTEAD_OF_GIT2"
461+ ) ;
462+ return ;
463+ }
464+
422465 let ( git_dep, repo) = git:: new_sha256_repo ( "dep1" , |p| {
423466 p. file ( "Cargo.toml" , & basic_manifest ( "dep1" , "1.0.0" ) )
424467 . file ( "src/lib.rs" , "" )
@@ -475,6 +518,13 @@ fn sha256_update_dep() {
475518
476519#[ cargo_test]
477520fn sha256_offline_with_cached_db ( ) {
521+ if cargo_uses_gitoxide ( ) {
522+ eprintln ! (
523+ "gitoxide hasn't yet supported sha256; ignore __CARGO_USE_GITOXIDE_INSTEAD_OF_GIT2"
524+ ) ;
525+ return ;
526+ }
527+
478528 let ( git_dep, _repo) = git:: new_sha256_repo ( "dep1" , |p| {
479529 p. file ( "Cargo.toml" , & basic_manifest ( "dep1" , "1.0.0" ) )
480530 . file ( "src/lib.rs" , "" )
@@ -515,6 +565,13 @@ fn sha256_offline_with_cached_db() {
515565
516566#[ cargo_test]
517567fn sha256_and_sha1_deps_coexist ( ) {
568+ if cargo_uses_gitoxide ( ) {
569+ eprintln ! (
570+ "gitoxide hasn't yet supported sha256; ignore __CARGO_USE_GITOXIDE_INSTEAD_OF_GIT2"
571+ ) ;
572+ return ;
573+ }
574+
518575 let ( sha256_dep, _repo256) = git:: new_sha256_repo ( "dep256" , |p| {
519576 p. file ( "Cargo.toml" , & basic_manifest ( "dep256" , "1.0.0" ) )
520577 . file ( "src/lib.rs" , "" )
0 commit comments