diff --git a/hugolib/config_test.go b/hugolib/config_test.go
index <HASH>..<HASH> 100644
--- a/hugolib/config_test.go
+++ b/hugolib/config_test.go
@@ -742,6 +742,7 @@ theme_param="themevalue2"
 		b := newB(c)
 
 		b.WithEnviron(
+			"HUGO_ENABLEGITINFO", "false",
 			// imaging.anchor is a string, and it's not possible
 			// to set a child attribute.
 			"HUGO_IMAGING_ANCHOR_FOO", "top",
config: Set HUGO_ENABLEGITINFO=false override in Set_in_string

This allows TestLoadConfigWithOsEnvOverrides/Set_in_string to PASS
even if there is no .git directory, e.g. during Debian package build.