mirror of
https://git.alemi.dev/tci.git
synced 2024-11-23 08:34:51 +01:00
fix: clone from correct branch
Co-authored-by: zaaarf <me@zaaarf.foo>
This commit is contained in:
parent
92ea79333e
commit
4b8c1a6476
1 changed files with 4 additions and 2 deletions
|
@ -30,7 +30,6 @@ impl Tci {
|
|||
|
||||
match self.cfg.branch.as_deref() {
|
||||
None => self.repo.updated("tci"),
|
||||
Some("") => true,
|
||||
Some(b) => self.repo.updated(b),
|
||||
}
|
||||
}
|
||||
|
@ -66,10 +65,13 @@ impl Tci {
|
|||
&format!("tci-{}", self.repo.name.replace('/', "_"))
|
||||
)?;
|
||||
|
||||
let clone_branch = self.repo.ci_branch.as_deref()
|
||||
.unwrap_or_else(|| self.cfg.branch.as_deref().unwrap_or("tci"));
|
||||
|
||||
// TODO recursive clone? automatically clone all submodules after?
|
||||
git2::build::RepoBuilder::new()
|
||||
.bare(false)
|
||||
.branch("tci")
|
||||
.branch(clone_branch)
|
||||
.clone(
|
||||
self.repo.path.to_str()
|
||||
.ok_or(TciErr::FsError("repo path is not a valid string"))?,
|
||||
|
|
Loading…
Reference in a new issue