makepkg: remove GITFLAGS support

Supporting git source fragments (branch, commit, tag) is difficult in
conjunction with GITFLAGS usage - particularly with the most common
use cases that reduce the amount of data cloned from the upstream repo.

Leaving GITFLAGS in place an documenting that various git source features
are not supported when GITFLAGS are in used is not an ideal 'solution'.
Instead, remove GITFLAGS support.

Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Allan McRae 2024-05-05 15:12:18 +10:00
parent 76e1cb1bf1
commit d74d7ec32c
2 changed files with 1 additions and 4 deletions

View file

@ -297,9 +297,6 @@ Environment Variables
**BUILDTOOLVER=**"<version>"::
The version of the '$BUILDTOOL' used.
**GITFLAGS**::
The options to pass when checking out git sources, replacing the default
"--mirror".
Configuration
-------------

View file

@ -49,7 +49,7 @@ download_git() {
if [[ ! -d "$dir" ]] || dir_is_empty "$dir" ; then
msg2 "$(gettext "Cloning %s %s repo...")" "${repo}" "git"
if ! git clone --origin=origin ${GITFLAGS:---mirror} "$url" "$dir"; then
if ! git clone --origin=origin ---mirror "$url" "$dir"; then
error "$(gettext "Failure while downloading %s %s repo")" "${repo}" "git"
plainerr "$(gettext "Aborting...")"
exit 1