aboutsummaryrefslogtreecommitdiffstats
path: root/config.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-05-24 16:57:01 -0700
committerJunio C Hamano <gitster@pobox.com>2024-05-24 16:57:02 -0700
commit4f215d214f15b1dbecd9816aea740b0df37b3fa5 (patch)
tree9da0e1a36964e4ee5ccdfd93a16d19ade7d32d85 /config.c
parent0f158320593bd57fe2c3fe55fbce751e9415ffc2 (diff)
parent48440f60a730b93b2a39449a69cb56db5e7114c7 (diff)
downloadgit-4f215d214f15b1dbecd9816aea740b0df37b3fa5.tar.gz
Merge branch 'fixes/2.45.1/2.40' into fixes/2.45.1/2.41
* fixes/2.45.1/2.40: Revert "fsck: warn about symlink pointing inside a gitdir" Revert "Add a helper function to compare file contents" clone: drop the protections where hooks aren't run tests: verify that `clone -c core.hooksPath=/dev/null` works again Revert "core.hooksPath: add some protection while cloning" init: use the correct path of the templates directory again hook: plug a new memory leak ci: stop installing "gcc-13" for osx-gcc ci: avoid bare "gcc" for osx-gcc job ci: drop mention of BREW_INSTALL_PACKAGES variable send-email: avoid creating more than one Term::ReadLine object send-email: drop FakeTerm hack
Diffstat (limited to 'config.c')
-rw-r--r--config.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/config.c b/config.c
index 66fc088bd8..b79baf83e3 100644
--- a/config.c
+++ b/config.c
@@ -1596,19 +1596,8 @@ static int git_default_core_config(const char *var, const char *value, void *cb)
if (!strcmp(var, "core.attributesfile"))
return git_config_pathname(&git_attributes_file, var, value);
- if (!strcmp(var, "core.hookspath")) {
- if (current_config_scope() == CONFIG_SCOPE_LOCAL &&
- git_env_bool("GIT_CLONE_PROTECTION_ACTIVE", 0))
- die(_("active `core.hooksPath` found in the local "
- "repository config:\n\t%s\nFor security "
- "reasons, this is disallowed by default.\nIf "
- "this is intentional and the hook should "
- "actually be run, please\nrun the command "
- "again with "
- "`GIT_CLONE_PROTECTION_ACTIVE=false`"),
- value);
+ if (!strcmp(var, "core.hookspath"))
return git_config_pathname(&git_hooks_path, var, value);
- }
if (!strcmp(var, "core.bare")) {
is_bare_repository_cfg = git_config_bool(var, value);