diff options
author | Vivien Didelot <vivien.didelot@savoirfairelinux.com> | 2015-11-06 23:39:24 -0500 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2015-11-29 18:52:44 +0100 |
commit | f8b8251a921a7fa4e05b545e503cfc4e736d1d0d (patch) | |
tree | 8f2df7714f6519eddfc6aad23d799aa2049f7832 /support/download | |
parent | 9ed8750b4313bf26798c063c83a071995c90bb40 (diff) |
support/download: fetch all refs on full git clone
When specifying BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION, a user may want to
specify the SHA of a reference different than a branch or tag.
For instance, Gerrit stores the patchsets under refs/changes/xx/xxx, and
Github stores the pull requests under refs/pull/xxx/head.
When cloning a repository with --bare, you don't fetch these references.
This patch uses --mirror for a full clone, in order to give the user
access to all references of the Git repository.
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Reviewed-by: "Maxime Hadjinlian" <maxime.hadjinlian@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'support/download')
-rwxr-xr-x | support/download/git | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/support/download/git b/support/download/git index 0e6103b64..357a55806 100755 --- a/support/download/git +++ b/support/download/git @@ -43,7 +43,7 @@ if [ -n "$(${GIT} ls-remote "${repo}" "${cset}" 2>&1)" ]; then fi if [ ${git_done} -eq 0 ]; then printf "Doing full clone\n" - ${GIT} clone ${verbose} --bare "${repo}" "${basename}" + ${GIT} clone ${verbose} --mirror "${repo}" "${basename}" fi GIT_DIR="${basename}" \ |