Fix unstable git checksums
Closes https://gitlab.archlinux.org/pacman/pacman/-/issues/131
(cherry picked from commit 9548d6cc76
)
This commit is contained in:
parent
3ad9366b26
commit
0828a085c1
1 changed files with 7 additions and 0 deletions
|
@ -68,6 +68,13 @@ download_git() {
|
|||
warning "$(gettext "Failure while updating %s %s repo")" "${repo}" "git"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Sanitize the cloned repo
|
||||
# $GIT_DIR/info/attributes overrides .gitattributes, and thus no files in the repository
|
||||
# can be altered by git features like export-subst or export-ignore
|
||||
local MAKEPKG_GIT_DIR="$(git -C "$dir" rev-parse --absolute-git-dir)"
|
||||
mkdir -p "$MAKEPKG_GIT_DIR/info"
|
||||
echo "* -export-subst -export-ignore" > "$MAKEPKG_GIT_DIR/info/attributes"
|
||||
}
|
||||
|
||||
extract_git() {
|
||||
|
|
Loading…
Add table
Reference in a new issue