diff --git a/cli/src/commands/debug/index.rs b/cli/src/commands/debug/index.rs index c626dc4df7..8793fceede 100644 --- a/cli/src/commands/debug/index.rs +++ b/cli/src/commands/debug/index.rs @@ -16,7 +16,6 @@ use std::fmt::Debug; use std::io::Write as _; use jj_lib::default_index::{AsCompositeIndex as _, DefaultReadonlyIndex}; -use jj_lib::op_walk; use crate::cli_util::CommandHelper; use crate::command_error::{internal_error, user_error, CommandError}; @@ -32,13 +31,10 @@ pub fn cmd_debug_index( _args: &DebugIndexArgs, ) -> Result<(), CommandError> { // Resolve the operation without loading the repo, so this command won't - // merge concurrent operations and update the index. + // update the index. let workspace = command.load_workspace()?; let repo_loader = workspace.repo_loader(); - let op = op_walk::resolve_op_for_load( - repo_loader, - command.global_args().at_operation.as_deref().unwrap_or("@"), - )?; + let op = command.resolve_operation(ui, repo_loader)?; let index_store = repo_loader.index_store(); let index = index_store .get_index_at_op(&op, repo_loader.store()) diff --git a/cli/src/commands/debug/reindex.rs b/cli/src/commands/debug/reindex.rs index 0e37e7b527..b8b2fa7f16 100644 --- a/cli/src/commands/debug/reindex.rs +++ b/cli/src/commands/debug/reindex.rs @@ -16,7 +16,6 @@ use std::fmt::Debug; use std::io::Write as _; use jj_lib::default_index::{AsCompositeIndex as _, DefaultIndexStore}; -use jj_lib::op_walk; use crate::cli_util::CommandHelper; use crate::command_error::{internal_error, user_error, CommandError}; @@ -35,10 +34,7 @@ pub fn cmd_debug_reindex( // be rebuilt while loading the repo. let workspace = command.load_workspace()?; let repo_loader = workspace.repo_loader(); - let op = op_walk::resolve_op_for_load( - repo_loader, - command.global_args().at_operation.as_deref().unwrap_or("@"), - )?; + let op = command.resolve_operation(ui, repo_loader)?; let index_store = repo_loader.index_store(); if let Some(default_index_store) = index_store.as_any().downcast_ref::() { default_index_store.reinit().map_err(internal_error)?;