Skip to content

Commit 23f9bc7

Browse files
committed
WIP
1 parent dc8fe1f commit 23f9bc7

File tree

1 file changed

+5
-1
lines changed
  • src/bootstrap/src/utils/tests

1 file changed

+5
-1
lines changed

src/bootstrap/src/utils/tests/git.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ impl GitCtx {
100100
}
101101

102102
pub fn commit(&self) -> String {
103-
self.run_git(&["add", "."]);
103+
self.run_git(&["add", "--all", "."]);
104104
self.run_git(&["commit", "-m", "commit message"]);
105105
self.get_current_commit()
106106
}
@@ -130,6 +130,10 @@ impl GitCtx {
130130
fn git_cmd(&self) -> Command {
131131
let mut cmd = Command::new("git");
132132
cmd.current_dir(&self.dir);
133+
// Ignore any global configs that the user might have set to ensure a more
134+
// reproducible behavior.
135+
cmd.env("GIT_CONFIG_NOSYSTEM", "1");
136+
cmd.env("GIT_CONFIG_SYSTEM", "/tmp/non-existent-config");
133137
cmd
134138
}
135139

0 commit comments

Comments
 (0)