eclass/git-r3: Sync with Gentoo

It's from Gentoo commit 207a50da440b7c6bea060972a7684e792c2a84fc.
This commit is contained in:
Flatcar Buildbot 2022-11-14 07:15:58 +00:00
parent 3e25373959
commit ca29dc9c51

View File

@ -887,6 +887,11 @@ git-r3_checkout() {
cp "${orig_repo}"/packed-refs "${GIT_DIR}"/packed-refs || die cp "${orig_repo}"/packed-refs "${GIT_DIR}"/packed-refs || die
fi fi
# mark this directory as "safe" so that src_install() can access it
# https://bugs.gentoo.org/879353
git config --global --add safe.directory \
"$(cd "${out_dir}" && echo "${PWD}")" || die
# (no need to copy HEAD, we will set it via checkout) # (no need to copy HEAD, we will set it via checkout)
if [[ -f ${orig_repo}/shallow ]]; then if [[ -f ${orig_repo}/shallow ]]; then