File tree 1 file changed +12
-3
lines changed
1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ use std::sync::atomic::{AtomicBool, Ordering};
9
9
use std:: sync:: Arc ;
10
10
use std:: thread;
11
11
12
- use cargo_test_support:: git:: cargo_uses_gitoxide;
12
+ use cargo_test_support:: git:: { add_submodule , cargo_uses_gitoxide} ;
13
13
use cargo_test_support:: paths;
14
14
use cargo_test_support:: prelude:: IntoData ;
15
15
use cargo_test_support:: prelude:: * ;
@@ -3847,11 +3847,20 @@ fn corrupted_checkout_with_cli() {
3847
3847
}
3848
3848
3849
3849
fn _corrupted_checkout ( with_cli : bool ) {
3850
- let git_project = git:: new ( "dep1" , |project| {
3850
+ let ( git_project, repository ) = git:: new_repo ( "dep1" , |project| {
3851
3851
project
3852
3852
. file ( "Cargo.toml" , & basic_manifest ( "dep1" , "0.5.0" ) )
3853
3853
. file ( "src/lib.rs" , "" )
3854
3854
} ) ;
3855
+
3856
+ let project2 = git:: new ( "dep2" , |project| {
3857
+ project. no_manifest ( ) . file ( "README.md" , "" )
3858
+ } ) ;
3859
+ let url = project2. root ( ) . to_url ( ) . to_string ( ) ;
3860
+ add_submodule ( & repository, & url, Path :: new ( "bar" ) ) ;
3861
+ git:: commit ( & repository) ;
3862
+ drop ( repository) ;
3863
+
3855
3864
let p = project ( )
3856
3865
. file (
3857
3866
"Cargo.toml" ,
@@ -3962,7 +3971,7 @@ fn different_user_relative_submodules() {
3962
3971
& format ! (
3963
3972
r#"
3964
3973
[package]
3965
- name = "foo"
3974
+ name = "foo"
3966
3975
version = "0.5.0"
3967
3976
edition = "2015"
3968
3977
You can’t perform that action at this time.
0 commit comments