| 252 | } |
| 253 | |
| 254 | pub fn list_chains(&self, current_branch: &str, show_prs: bool) -> Result<(), Error> { |
| 255 | let list = Chain::get_all_chains(self)?; |
| 256 | |
| 257 | if list.is_empty() { |
| 258 | println!("No chains to list."); |
| 259 | println!( |
| 260 | "To initialize a chain for this branch, run {} init <chain_name> <root_branch>", |
| 261 | self.executable_name |
| 262 | ); |
| 263 | return Ok(()); |
| 264 | } |
| 265 | |
| 266 | for (index, chain) in list.iter().enumerate() { |
| 267 | chain.display_list(self, current_branch, show_prs)?; |
| 268 | |
| 269 | if index != list.len() - 1 { |
| 270 | println!(); |
| 271 | } |
| 272 | } |
| 273 | |
| 274 | Ok(()) |
| 275 | } |
| 276 | |
| 277 | pub fn move_branch( |
| 278 | &self, |