diff --git a/src/tci.rs b/src/tci.rs index 31de07e..d38cc66 100644 --- a/src/tci.rs +++ b/src/tci.rs @@ -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), } } @@ -65,11 +64,14 @@ impl Tci { let tmp = tempdir::TempDir::new( &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"))?,