rename deep to unshallow and add a depth parameter
This commit is contained in:
parent
773ab0b8f5
commit
cc381629fa
|
@ -96,7 +96,8 @@ _project: Optional["Project"] = None
|
||||||
class Extern(DataClassJsonMixin):
|
class Extern(DataClassJsonMixin):
|
||||||
git: str
|
git: str
|
||||||
tag: str
|
tag: str
|
||||||
deep: bool = dt.field(default=False)
|
shallow: bool = dt.field(default=True)
|
||||||
|
depth: int = dt.field(default=1)
|
||||||
|
|
||||||
|
|
||||||
@dt.dataclass
|
@dt.dataclass
|
||||||
|
@ -161,8 +162,8 @@ class Project(Manifest):
|
||||||
extPath,
|
extPath,
|
||||||
]
|
]
|
||||||
|
|
||||||
if not ext.deep:
|
if ext.shallow:
|
||||||
cmd += ["--depth", "1"]
|
cmd += ["--depth", str(ext.depth)]
|
||||||
|
|
||||||
shell.exec(*cmd, quiet=True)
|
shell.exec(*cmd, quiet=True)
|
||||||
project = Project.at(Path(extPath))
|
project = Project.at(Path(extPath))
|
||||||
|
|
Loading…
Reference in a new issue