fix: clone tci branch when running script

This commit is contained in:
əlemi 2024-02-22 05:09:38 +01:00
parent 2cd2f75257
commit 6e77f64f4d
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -62,12 +62,15 @@ impl Tci {
&format!("tci-{}", self.repo.name.replace('/', "_"))
)?;
// TODO allow customizing clone? just clone recursive? just let hook setup submodules?
git2::Repository::clone(
self.repo.path.to_str()
.ok_or(TciErr::FsError("repo path is not a valid string"))?,
tmp.path(),
)?;
// TODO recursive clone? automatically clone all submodules after?
git2::build::RepoBuilder::new()
.bare(false)
.branch("tci")
.clone(
self.repo.path.to_str()
.ok_or(TciErr::FsError("repo path is not a valid string"))?,
tmp.path(),
)?;
Ok(tmp)
}