File tree 1 file changed +8
-4
lines changed
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -559,9 +559,11 @@ impl Build {
559
559
match submodule. state {
560
560
State :: MaybeDirty => {
561
561
// drop staged changes
562
- self . run ( git ( ) . arg ( "-C" ) . arg ( submodule. path ) . args ( & [ "reset" , "--hard" ] ) ) ;
562
+ self . run ( git ( ) . current_dir ( submodule. path )
563
+ . args ( & [ "reset" , "--hard" ] ) ) ;
563
564
// drops unstaged changes
564
- self . run ( git ( ) . arg ( "-C" ) . arg ( submodule. path ) . args ( & [ "clean" , "-fdx" ] ) ) ;
565
+ self . run ( git ( ) . current_dir ( submodule. path )
566
+ . args ( & [ "clean" , "-fdx" ] ) ) ;
565
567
} ,
566
568
State :: NotInitialized => {
567
569
self . run ( git_submodule ( ) . arg ( "init" ) . arg ( submodule. path ) ) ;
@@ -570,8 +572,10 @@ impl Build {
570
572
State :: OutOfSync => {
571
573
// drops submodule commits that weren't reported to the (outer) git repository
572
574
self . run ( git_submodule ( ) . arg ( "update" ) . arg ( submodule. path ) ) ;
573
- self . run ( git ( ) . arg ( "-C" ) . arg ( submodule. path ) . args ( & [ "reset" , "--hard" ] ) ) ;
574
- self . run ( git ( ) . arg ( "-C" ) . arg ( submodule. path ) . args ( & [ "clean" , "-fdx" ] ) ) ;
575
+ self . run ( git ( ) . current_dir ( submodule. path )
576
+ . args ( & [ "reset" , "--hard" ] ) ) ;
577
+ self . run ( git ( ) . current_dir ( submodule. path )
578
+ . args ( & [ "clean" , "-fdx" ] ) ) ;
575
579
} ,
576
580
}
577
581
}
You can’t perform that action at this time.
0 commit comments