Skip to content

Commit c3b27d5

Browse files
make ignore-git true by default when channel is dev
1 parent c774c95 commit c3b27d5

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

config.toml.example

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,10 @@
259259
#codegen-tests = true
260260

261261
# Flag indicating whether git info will be retrieved from .git automatically.
262-
#ignore-git = false
262+
# Having the git information can cause a lot of rebuilds during development.
263+
# Note: If this attribute is not explicity set (e.g. it left commented out) it
264+
# will default to true if channel = "dev", but will default to false otherwise.
265+
#ignore-git = true
263266

264267
# =============================================================================
265268
# Options for specific targets

src/bootstrap/config.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ impl Config {
296296
config.rust_codegen_units = 1;
297297
config.channel = "dev".to_string();
298298
config.codegen_tests = true;
299-
config.ignore_git = false;
299+
config.ignore_git = true;
300300
config.rust_dist_src = true;
301301

302302
config.on_fail = flags.on_fail;
@@ -419,7 +419,12 @@ impl Config {
419419
set(&mut config.use_jemalloc, rust.use_jemalloc);
420420
set(&mut config.backtrace, rust.backtrace);
421421
set(&mut config.channel, rust.channel.clone());
422+
423+
// on the dev channel, ignore_git should be true by default
424+
// on other channels it should be false by default
425+
config.ignore_git = config.channel == "dev";
422426
set(&mut config.ignore_git, rust.ignore_git);
427+
423428
config.rustc_default_linker = rust.default_linker.clone();
424429
config.rustc_default_ar = rust.default_ar.clone();
425430
config.musl_root = rust.musl_root.clone().map(PathBuf::from);

0 commit comments

Comments
 (0)