mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-26 15:32:30 +00:00
Merge pull request #9747 from zvonkok/remove-git-config
ci: Remove all git config safe.directory
This commit is contained in:
commit
dd89d35b75
@ -21,13 +21,7 @@ clone_tests_repo()
|
||||
{
|
||||
if [ -d "$tests_repo_dir" ]; then
|
||||
[ -n "${CI:-}" ] && return
|
||||
# git config --global --add safe.directory will always append
|
||||
# the target to .gitconfig without checking the existence of
|
||||
# the target, so it's better to check it before adding the target repo.
|
||||
local sd="$(git config --global --get safe.directory ${tests_repo_dir} || true)"
|
||||
if [ -z "${sd}" ]; then
|
||||
git config --global --add safe.directory ${tests_repo_dir}
|
||||
fi
|
||||
|
||||
pushd "${tests_repo_dir}"
|
||||
git checkout "${branch}"
|
||||
git pull
|
||||
|
@ -1211,8 +1211,6 @@ silent_mode_error_trap() {
|
||||
}
|
||||
|
||||
main() {
|
||||
git config --global --add safe.directory ${repo_root_dir}
|
||||
|
||||
local build_targets
|
||||
local silent
|
||||
build_targets=(
|
||||
|
@ -107,8 +107,6 @@ get_last_modification() {
|
||||
local file="${1}"
|
||||
|
||||
pushd ${repo_root_dir} &> /dev/null
|
||||
# This is a workaround needed for when running this code on Jenkins
|
||||
git config --global --add safe.directory ${repo_root_dir} &> /dev/null
|
||||
|
||||
dirty=""
|
||||
[ $(git status --porcelain | grep "${file#${repo_root_dir}/}" | wc -l) -gt 0 ] && dirty="-dirty"
|
||||
|
@ -59,7 +59,6 @@ build_clh_from_source() {
|
||||
repo_dir="${repo_dir//.git}"
|
||||
rm -rf "${repo_dir}"
|
||||
git clone "${cloud_hypervisor_repo}"
|
||||
git config --global --add safe.directory "$PWD/repo_dir"
|
||||
pushd "${repo_dir}"
|
||||
|
||||
if [ -n "${cloud_hypervisor_pr}" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user