From b2e309c9e478118b50eecdf016a02c7a8bac5aee Mon Sep 17 00:00:00 2001 From: Martin von Zweigbergk Date: Sun, 23 Oct 2022 10:47:27 -0700 Subject: [PATCH] tests: stop libgit2 from reading configs in lib tests too I had `init.defaultBranch = main` in my global config (just being rolled out internally at Google, it seems), which made `test_import_refs_reimport_head_removed()` and `test_fetch_initial_commit()` fail. This fixes it. --- lib/src/testutils.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/src/testutils.rs b/lib/src/testutils.rs index 8961af068..543fe05bb 100644 --- a/lib/src/testutils.rs +++ b/lib/src/testutils.rs @@ -59,6 +59,7 @@ pub fn hermetic_libgit2() { } pub fn new_temp_dir() -> TempDir { + hermetic_libgit2(); tempfile::Builder::new() .prefix("jj-test-") .tempdir()