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('/', "_")) &format!("tci-{}", self.repo.name.replace('/', "_"))
)?; )?;
// TODO allow customizing clone? just clone recursive? just let hook setup submodules? // TODO recursive clone? automatically clone all submodules after?
git2::Repository::clone( git2::build::RepoBuilder::new()
self.repo.path.to_str() .bare(false)
.ok_or(TciErr::FsError("repo path is not a valid string"))?, .branch("tci")
tmp.path(), .clone(
)?; self.repo.path.to_str()
.ok_or(TciErr::FsError("repo path is not a valid string"))?,
tmp.path(),
)?;
Ok(tmp) Ok(tmp)
} }