]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'jc/fix-2.45.1-and-friends-for-2.39' into fixes/2.45.1/2.40
authorJunio C Hamano <gitster@pobox.com>
Fri, 24 May 2024 19:29:35 +0000 (12:29 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 24 May 2024 19:29:36 +0000 (12:29 -0700)
Revert overly aggressive "layered defence" that went into 2.45.1
and friends, which broke "git-lfs", "git-annex", and other use
cases, so that we can rebuild necessary counterparts in the open.

* jc/fix-2.45.1-and-friends-for-2.39:
  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

13 files changed:
1  2 
.github/workflows/main.yml
Makefile
builtin/clone.c
cache.h
config.c
fsck.c
fsck.h
git-send-email.perl
hook.c
t/t1450-fsck.sh
t/t1800-hook.sh
t/t5601-clone.sh
t/t9001-send-email.sh

Simple merge
diff --cc Makefile
Simple merge
diff --cc builtin/clone.c
index 5fa29014007a3a3a1078b60b0f3a2401b5f939e2,9ec500d427e315a2ac52f33dce02ae1d8ee9eaf6..399b2d3f421ec5e8d05e106854824e9f01282efd
@@@ -1456,8 -1421,7 +1447,8 @@@ int cmd_clone(int argc, const char **ar
        free(unborn_head);
        free(dir);
        free(path);
-       free(template_dir_dup);
 +      free(repo_to_free);
+       UNLEAK(repo);
        junk_mode = JUNK_LEAVE_ALL;
  
        transport_ls_refs_options_release(&transport_ls_refs_options);
diff --cc cache.h
Simple merge
diff --cc config.c
Simple merge
diff --cc fsck.c
Simple merge
diff --cc fsck.h
Simple merge
Simple merge
diff --cc hook.c
Simple merge
diff --cc t/t1450-fsck.sh
Simple merge
diff --cc t/t1800-hook.sh
index 0f0c706d07a6ef4c6e5e0215dd533d3008aef07b,2ef3579fa7c23db5055c41e68438d39871bcf6e9..3506f627b6cf20f11e4cfd78b309e9e9acc07148
@@@ -177,37 -177,4 +177,22 @@@ test_expect_success 'git hook run a hoo
        test_cmp expect actual
  '
  
- test_expect_success 'clone protections' '
-       test_config core.hooksPath "$(pwd)/my-hooks" &&
-       mkdir -p my-hooks &&
-       write_script my-hooks/test-hook <<-\EOF &&
-       echo Hook ran $1
-       EOF
-       git hook run test-hook 2>err &&
-       grep "Hook ran" err &&
-       test_must_fail env GIT_CLONE_PROTECTION_ACTIVE=true \
-               git hook run test-hook 2>err &&
-       grep "active .core.hooksPath" err &&
-       ! grep "Hook ran" err
- '
 +test_expect_success 'stdin to hooks' '
 +      write_script .git/hooks/test-hook <<-\EOF &&
 +      echo BEGIN stdin
 +      cat
 +      echo END stdin
 +      EOF
 +
 +      cat >expect <<-EOF &&
 +      BEGIN stdin
 +      hello
 +      END stdin
 +      EOF
 +
 +      echo hello >input &&
 +      git hook run --to-stdin=input test-hook 2>actual &&
 +      test_cmp expect actual
 +'
 +
  test_done
Simple merge
Simple merge