Skip to content

Commit 2df56a6

Browse files
Remove src_is_git, instead call method on rust_info directly.
1 parent 785e5c7 commit 2df56a6

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

src/bootstrap/channel.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,4 +101,8 @@ impl GitInfo {
101101
}
102102
version
103103
}
104+
105+
pub fn is_git(&self) -> bool {
106+
self.inner.is_some()
107+
}
104108
}

src/bootstrap/dist.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ pub fn plain_source_tarball(build: &Build) {
623623
write_file(&plain_dst_src.join("version"), build.rust_version().as_bytes());
624624

625625
// If we're building from git sources, we need to vendor a complete distribution.
626-
if build.src_is_git {
626+
if build.rust_info.is_git() {
627627
// Get cargo-vendor installed, if it isn't already.
628628
let mut has_cargo_vendor = false;
629629
let mut cmd = Command::new(&build.initial_cargo);

src/bootstrap/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,6 @@ pub struct Build {
183183
cxx: HashMap<String, gcc::Tool>,
184184
crates: HashMap<String, Crate>,
185185
is_sudo: bool,
186-
src_is_git: bool,
187186
ci_env: CiEnv,
188187
delayed_failures: Cell<usize>,
189188
}
@@ -262,7 +261,6 @@ impl Build {
262261
lldb_version: None,
263262
lldb_python_dir: None,
264263
is_sudo: is_sudo,
265-
src_is_git: src_is_git,
266264
ci_env: CiEnv::current(),
267265
delayed_failures: Cell::new(0),
268266
}

src/bootstrap/sanity.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ pub fn check(build: &mut Build) {
8080
let mut cmd_finder = Finder::new();
8181
// If we've got a git directory we're gona need git to update
8282
// submodules and learn about various other aspects.
83-
if build.src_is_git {
83+
if build.rust_info.is_git() {
8484
cmd_finder.must_have("git");
8585
}
8686

0 commit comments

Comments
 (0)