Debian Codegraph @

cli/src/commands/bisect/mod.rs

raw
1 // Copyright 2025 The Jujutsu Authors
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // https://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 mod run;
16
17 use crate::cli_util::CommandHelper;
18 use crate::command_error::CommandError;
19 use crate::ui::Ui;
20
21 /// Find a bad revision by bisection.
22 #[derive(clap::Subcommand, Clone, Debug)]
23 pub enum BisectCommand {
24 Run(run::BisectRunArgs),
25 }
26
27 pub async fn cmd_bisect(
28 ui: &mut Ui,
29 command: &CommandHelper,
30 subcommand: &BisectCommand,
31 ) -> Result<(), CommandError> {
32 match subcommand {
33 BisectCommand::Run(args) => run::cmd_bisect_run(ui, command, args).await,
34 }
35 }