Skip to content

Commit 4c97a73

Browse files
committed
Remove 'log' command and related code
The 'log' subcommand and its CommandName variant were removed along with the module and handling in lib.rs because the project no longer supports or needs a separate 'but log' command. This cleans up the CLI enum, command dispatch, module imports, and help groupings to reflect that 'status' is now the sole inspection command.
1 parent f70d17f commit 4c97a73

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

crates/but/src/args.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ pub struct Args {
2121

2222
#[derive(Debug, clap::Subcommand)]
2323
pub enum Subcommands {
24-
/// Show commits on active branches in your workspace.
25-
Log,
2624
/// Overview of the uncommitted changes in the repository.
2725
#[clap(alias = "st")]
2826
Status {
@@ -180,8 +178,6 @@ For examples see `but rub --help`."
180178

181179
#[derive(Debug, Clone, Copy, clap::ValueEnum, Default)]
182180
pub enum CommandName {
183-
#[clap(alias = "log")]
184-
Log,
185181
#[clap(alias = "st")]
186182
Status,
187183
#[clap(alias = "stf", hide = true)]

crates/but/src/lib.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ mod editor;
1919
mod forge;
2020
mod id;
2121
mod init;
22-
mod log;
2322
mod mark;
2423
mod mcp;
2524
mod mcp_internal;
@@ -167,13 +166,6 @@ pub async fn handle_args(args: impl Iterator<Item = OsString>) -> Result<()> {
167166
metrics_if_configured(app_settings, CommandName::Worktree, props(start, &result)).ok();
168167
result
169168
}
170-
Subcommands::Log => {
171-
let project = get_or_init_project(&args.current_dir)?;
172-
let result = log::commit_graph(&project, args.json);
173-
metrics_if_configured(app_settings, CommandName::Log, props(start, &result)).ok();
174-
result?;
175-
Ok(())
176-
}
177169
Subcommands::Status {
178170
show_files,
179171
verbose,
@@ -388,7 +380,7 @@ fn print_grouped_help() {
388380

389381
// Define command groupings and their order (excluding MISC)
390382
let groups = [
391-
("Inspection".yellow(), vec!["status", "log"]),
383+
("Inspection".yellow(), vec!["status"]),
392384
(
393385
"Branching and Committing".yellow(),
394386
vec!["commit", "push", "new", "branch", "base", "mark", "unmark"],

0 commit comments

Comments
 (0)