mirror of
https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git
synced 2025-07-13 03:19:47 +03:00
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.
This commit is contained in:
parent
bfbb095895
commit
a86669d521
2 changed files with 3 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue