mirror of
https://git.alemi.dev/tci.git
synced 2024-11-23 08:34:51 +01:00
fix: clone tci branch when running script
This commit is contained in:
parent
2cd2f75257
commit
6e77f64f4d
1 changed files with 9 additions and 6 deletions
15
src/tci.rs
15
src/tci.rs
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue