diff --git a/docs/manual/adding-packages-generic.adoc b/docs/manual/adding-packages-generic.adoc index f0b0508f53..7e2e066c16 100644 --- a/docs/manual/adding-packages-generic.adoc +++ b/docs/manual/adding-packages-generic.adoc @@ -270,7 +270,9 @@ not and can not work as people would expect it should: server-side checking for user logins and passwords, or to use a proxy. All download methods valid for +LIBFOO_SITE_METHOD+ are supported; valid options depend on the download method (consult the man page - for the respective download utilities). + for the respective download utilities). For git, +FOO_DL_OPTS+ will + only be passed to `git fetch` and no other git command (esp. not to + `git lfs fetch` or `git submodule update`). * +LIBFOO_EXTRA_DOWNLOADS+ is a space-separated list of additional files that Buildroot should download. If an entry contains +://+ diff --git a/support/download/git b/support/download/git index 8123bc3153..fdc00607cc 100755 --- a/support/download/git +++ b/support/download/git @@ -133,8 +133,8 @@ fi _git remote set-url origin "'${uri}'" printf "Fetching all references\n" -_git fetch origin -_git fetch origin -t -f +_git fetch "${@}" origin +_git fetch "${@}" origin -t -f # Try to get the special refs exposed by some forges (pull-requests for # github, changes for gerrit...). There is no easy way to know whether @@ -143,7 +143,7 @@ _git fetch origin -t -f # below, if there is an issue anyway. Since most of the cset we're gonna # have to clone are not such special refs, consign the output to oblivion # so as not to alarm unsuspecting users, but still trace it as a warning. -if ! _git fetch origin "'${cset}:${cset}'" >/dev/null 2>&1; then +if ! _git fetch "${@}" origin "'${cset}:${cset}'" >/dev/null 2>&1; then printf "Could not fetch special ref '%s'; assuming it is not special.\n" "${cset}" fi