libmakepkg: make sure git cloned repo's remote is named origin
makepkg assumes that the remote git repo is named "origin" at several places in its handling of git sources. It is possible to set the remote repo name since git v2.30.0 (with bug fix for bare checkouts in v2.30.2). Add "--origin=origin" to all git clone commands. Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
e83e53f3f9
commit
366b527757
1 changed files with 2 additions and 2 deletions
|
@ -48,7 +48,7 @@ download_git() {
|
||||||
|
|
||||||
if [[ ! -d "$dir" ]] || dir_is_empty "$dir" ; then
|
if [[ ! -d "$dir" ]] || dir_is_empty "$dir" ; then
|
||||||
msg2 "$(gettext "Cloning %s %s repo...")" "${repo}" "git"
|
msg2 "$(gettext "Cloning %s %s repo...")" "${repo}" "git"
|
||||||
if ! git clone ${GITFLAGS:---mirror} "$url" "$dir"; then
|
if ! git clone --origin=origin ${GITFLAGS:---mirror} "$url" "$dir"; then
|
||||||
error "$(gettext "Failure while downloading %s %s repo")" "${repo}" "git"
|
error "$(gettext "Failure while downloading %s %s repo")" "${repo}" "git"
|
||||||
plainerr "$(gettext "Aborting...")"
|
plainerr "$(gettext "Aborting...")"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -91,7 +91,7 @@ extract_git() {
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
cd_safe "$srcdir"
|
cd_safe "$srcdir"
|
||||||
elif ! git clone -s "$dir" "${dir##*/}"; then
|
elif ! git clone --origin=origin -s "$dir" "${dir##*/}"; then
|
||||||
error "$(gettext "Failure while creating working copy of %s %s repo")" "${repo}" "git"
|
error "$(gettext "Failure while creating working copy of %s %s repo")" "${repo}" "git"
|
||||||
plainerr "$(gettext "Aborting...")"
|
plainerr "$(gettext "Aborting...")"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Add table
Reference in a new issue