commit:     f989b3c750b5a59aabd83464b2177c73b0b932f3
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 30 04:59:03 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Sep 30 05:02:17 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f989b3c7

dev-vcs/git: rebase USE=-safe-directory patch

Closes: https://github.com/gentoo/gentoo/pull/38802
Closes: https://bugs.gentoo.org/939895
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-vcs/git/files/git-2.46.2-unsafe-directory.patch | 14 ++++++++++++++
 dev-vcs/git/git-2.46.2.ebuild                       |  2 +-
 dev-vcs/git/git-9999-r1.ebuild                      |  2 +-
 dev-vcs/git/git-9999-r2.ebuild                      |  2 +-
 dev-vcs/git/git-9999-r3.ebuild                      |  2 +-
 dev-vcs/git/git-9999.ebuild                         |  2 +-
 6 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/dev-vcs/git/files/git-2.46.2-unsafe-directory.patch 
b/dev-vcs/git/files/git-2.46.2-unsafe-directory.patch
new file mode 100644
index 000000000000..0e07371a0d88
--- /dev/null
+++ b/dev-vcs/git/files/git-2.46.2-unsafe-directory.patch
@@ -0,0 +1,14 @@
+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,

diff --git a/dev-vcs/git/git-2.46.2.ebuild b/dev-vcs/git/git-2.46.2.ebuild
index 6112d2fa6228..17a8afd1ac8b 100644
--- a/dev-vcs/git/git-2.46.2.ebuild
+++ b/dev-vcs/git/git-2.46.2.ebuild
@@ -253,7 +253,7 @@ src_prepare() {
                # This patch neuters the "safe directory" detection.
                # bugs #838271, #838223
                PATCHES+=(
-                       "${FILESDIR}"/git-2.37.2-unsafe-directory.patch
+                       "${FILESDIR}"/git-2.46.2-unsafe-directory.patch
                )
        fi
 

diff --git a/dev-vcs/git/git-9999-r1.ebuild b/dev-vcs/git/git-9999-r1.ebuild
index 6112d2fa6228..17a8afd1ac8b 100644
--- a/dev-vcs/git/git-9999-r1.ebuild
+++ b/dev-vcs/git/git-9999-r1.ebuild
@@ -253,7 +253,7 @@ src_prepare() {
                # This patch neuters the "safe directory" detection.
                # bugs #838271, #838223
                PATCHES+=(
-                       "${FILESDIR}"/git-2.37.2-unsafe-directory.patch
+                       "${FILESDIR}"/git-2.46.2-unsafe-directory.patch
                )
        fi
 

diff --git a/dev-vcs/git/git-9999-r2.ebuild b/dev-vcs/git/git-9999-r2.ebuild
index 6112d2fa6228..17a8afd1ac8b 100644
--- a/dev-vcs/git/git-9999-r2.ebuild
+++ b/dev-vcs/git/git-9999-r2.ebuild
@@ -253,7 +253,7 @@ src_prepare() {
                # This patch neuters the "safe directory" detection.
                # bugs #838271, #838223
                PATCHES+=(
-                       "${FILESDIR}"/git-2.37.2-unsafe-directory.patch
+                       "${FILESDIR}"/git-2.46.2-unsafe-directory.patch
                )
        fi
 

diff --git a/dev-vcs/git/git-9999-r3.ebuild b/dev-vcs/git/git-9999-r3.ebuild
index 6112d2fa6228..17a8afd1ac8b 100644
--- a/dev-vcs/git/git-9999-r3.ebuild
+++ b/dev-vcs/git/git-9999-r3.ebuild
@@ -253,7 +253,7 @@ src_prepare() {
                # This patch neuters the "safe directory" detection.
                # bugs #838271, #838223
                PATCHES+=(
-                       "${FILESDIR}"/git-2.37.2-unsafe-directory.patch
+                       "${FILESDIR}"/git-2.46.2-unsafe-directory.patch
                )
        fi
 

diff --git a/dev-vcs/git/git-9999.ebuild b/dev-vcs/git/git-9999.ebuild
index 6112d2fa6228..17a8afd1ac8b 100644
--- a/dev-vcs/git/git-9999.ebuild
+++ b/dev-vcs/git/git-9999.ebuild
@@ -253,7 +253,7 @@ src_prepare() {
                # This patch neuters the "safe directory" detection.
                # bugs #838271, #838223
                PATCHES+=(
-                       "${FILESDIR}"/git-2.37.2-unsafe-directory.patch
+                       "${FILESDIR}"/git-2.46.2-unsafe-directory.patch
                )
        fi
 

Reply via email to