From a86669d521ad0be3df6395051cc5f314778b76d1 Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Tue, 12 May 2020 20:58:24 +0200 Subject: [PATCH] pmb.helpers.git.clone: remove shallow option This made sense for Alpine's aports.git repository as we were only using the master branch. But now that we are using more branches, we need the entire git repository with all its branches cloned. --- pmb/config/pmaports.py | 2 +- pmb/helpers/git.py | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/pmb/config/pmaports.py b/pmb/config/pmaports.py index 3a11b4b8..a4ee0676 100644 --- a/pmb/config/pmaports.py +++ b/pmb/config/pmaports.py @@ -33,7 +33,7 @@ def clone(args): " recipes (pmaports)...") # Set up the native chroot and clone pmaports - pmb.helpers.git.clone(args, "pmaports", False) + pmb.helpers.git.clone(args, "pmaports") def symlink(args): diff --git a/pmb/helpers/git.py b/pmb/helpers/git.py index 2a32fe59..049eebf6 100644 --- a/pmb/helpers/git.py +++ b/pmb/helpers/git.py @@ -21,15 +21,13 @@ def get_path(args, name_repo): return args.work + "/cache_git/" + name_repo -def clone(args, name_repo, shallow=True): +def clone(args, name_repo): """ Clone a git repository to $WORK/cache_git/$name_repo (or to the overridden path set in args, as with pmbootstrap --aports). :param name_repo: short alias used for the repository name, from pmb.config.git_repos (e.g. "aports_upstream", - "pmaports") - :param shallow: only clone the last revision of the repository, instead - of the entire repository (faster, saves bandwith) """ + "pmaports") """ # Check for repo name in the config if name_repo not in pmb.config.git_repos: raise ValueError("No git repository configured for " + name_repo) @@ -39,8 +37,6 @@ def clone(args, name_repo, shallow=True): # Build git command url = pmb.config.git_repos[name_repo] command = ["git", "clone"] - if shallow: - command += ["--depth=1"] command += [url, path] # Create parent dir and clone