mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-07-31 10:58:21 -07:00
Closes: https://github.com/gentoo/gentoo/pull/38802 Closes: https://bugs.gentoo.org/939895 Signed-off-by: Sam James <sam@gentoo.org>
15 lines
429 B
Diff
15 lines
429 B
Diff
Neuter the "safe directory" feature, except for tests.
|
|
--- a/setup.c
|
|
+++ b/setup.c
|
|
@@ -1316,7 +1316,9 @@ static int ensure_valid_ownership(const char *gitfile,
|
|
git_protected_config(safe_directory_cb, &data);
|
|
|
|
free(data.path);
|
|
- return data.is_safe;
|
|
+ if (git_env_bool("GIT_TEST_ASSUME_DIFFERENT_OWNER", 0))
|
|
+ return data.is_safe;
|
|
+ return 1;
|
|
}
|
|
|
|
void die_upon_dubious_ownership(const char *gitfile, const char *worktree,
|