(&self)
| 166 | |
| 167 | impl crate::commands::Command for Insert { |
| 168 | fn run(&self) -> CliResult<()> { |
| 169 | let repo_path = self.repository.as_ref().map(std::path::Path::new); |
| 170 | let repo = require_repository(repo_path)?; |
| 171 | |
| 172 | match &self.command { |
| 173 | Some(InsertSubcommand::FromView(args)) => run_from_view(&repo, args), |
| 174 | Some(InsertSubcommand::Tag(args)) => run_tag(&repo, args), |
| 175 | Some(InsertSubcommand::Pick(args)) => run_pick(&repo, args), |
| 176 | Some(InsertSubcommand::Preview(args)) => run_preview(&repo, args), |
| 177 | None => { |
| 178 | // Insert a single change |
| 179 | if let Some(ref change_str) = self.change { |
| 180 | run_single_insert(&repo, change_str, self) |
| 181 | } else { |
| 182 | Err(CliError::InvalidArgument { |
| 183 | message: "Missing CHANGE argument. Provide a change hash or use a subcommand (from-view, tag, pick)".to_string(), |
| 184 | }) |
| 185 | } |
| 186 | } |
| 187 | } |
| 188 | } |
| 189 | } |
| 190 | |
| 191 | // Subcommand Implementations |
nothing calls this directly
no test coverage detected