@@ -547,7 +547,7 @@ impl Config {
547547 build. cargo = build. cargo . take ( ) . or ( std:: env:: var_os ( "CARGO" ) . map ( |p| p. into ( ) ) ) ;
548548 }
549549
550- if GitInfo :: new ( false , & config. src ) . is_from_tarball ( ) && toml. profile . is_none ( ) {
550+ if config . git_info ( false , & config. src ) . is_from_tarball ( ) && toml. profile . is_none ( ) {
551551 toml. profile = Some ( "dist" . into ( ) ) ;
552552 }
553553
@@ -850,19 +850,21 @@ impl Config {
850850 let default = config. channel == "dev" ;
851851 config. omit_git_hash = toml. rust . as_ref ( ) . and_then ( |r| r. omit_git_hash ) . unwrap_or ( default) ;
852852
853- config. rust_info = GitInfo :: new ( config. omit_git_hash , & config. src ) ;
854- config. cargo_info = GitInfo :: new ( config. omit_git_hash , & config. src . join ( "src/tools/cargo" ) ) ;
853+ config. rust_info = config. git_info ( config. omit_git_hash , & config. src ) ;
854+ config. cargo_info =
855+ config. git_info ( config. omit_git_hash , & config. src . join ( "src/tools/cargo" ) ) ;
855856 config. rust_analyzer_info =
856- GitInfo :: new ( config. omit_git_hash , & config. src . join ( "src/tools/rust-analyzer" ) ) ;
857+ config . git_info ( config. omit_git_hash , & config. src . join ( "src/tools/rust-analyzer" ) ) ;
857858 config. clippy_info =
858- GitInfo :: new ( config. omit_git_hash , & config. src . join ( "src/tools/clippy" ) ) ;
859- config. miri_info = GitInfo :: new ( config. omit_git_hash , & config. src . join ( "src/tools/miri" ) ) ;
859+ config. git_info ( config. omit_git_hash , & config. src . join ( "src/tools/clippy" ) ) ;
860+ config. miri_info =
861+ config. git_info ( config. omit_git_hash , & config. src . join ( "src/tools/miri" ) ) ;
860862 config. rustfmt_info =
861- GitInfo :: new ( config. omit_git_hash , & config. src . join ( "src/tools/rustfmt" ) ) ;
863+ config . git_info ( config. omit_git_hash , & config. src . join ( "src/tools/rustfmt" ) ) ;
862864 config. enzyme_info =
863- GitInfo :: new ( config. omit_git_hash , & config. src . join ( "src/tools/enzyme" ) ) ;
864- config. in_tree_llvm_info = GitInfo :: new ( false , & config. src . join ( "src/llvm-project" ) ) ;
865- config. in_tree_gcc_info = GitInfo :: new ( false , & config. src . join ( "src/gcc" ) ) ;
865+ config . git_info ( config. omit_git_hash , & config. src . join ( "src/tools/enzyme" ) ) ;
866+ config. in_tree_llvm_info = config . git_info ( false , & config. src . join ( "src/llvm-project" ) ) ;
867+ config. in_tree_gcc_info = config . git_info ( false , & config. src . join ( "src/gcc" ) ) ;
866868
867869 config. vendor = vendor. unwrap_or (
868870 config. rust_info . is_from_tarball ( )
@@ -1329,7 +1331,7 @@ impl Config {
13291331
13301332 // NOTE: The check for the empty directory is here because when running x.py the first time,
13311333 // the submodule won't be checked out. Check it out now so we can build it.
1332- if !GitInfo :: new ( false , & absolute_path) . is_managed_git_subrepository ( )
1334+ if !self . git_info ( false , & absolute_path) . is_managed_git_subrepository ( )
13331335 && !helpers:: dir_is_empty ( & absolute_path)
13341336 {
13351337 return ;
0 commit comments