mirror of
https://github.com/martinvonz/jj.git
synced 2024-11-28 17:41:14 +00:00
cli: avoid a call to Index::num_commits()
I'm trying to remove the function from the trait.
This commit is contained in:
parent
52e4bee3fe
commit
efc9cc9885
1 changed files with 6 additions and 1 deletions
|
@ -3122,10 +3122,15 @@ fn cmd_debug(
|
|||
if let Some(default_index_store) = default_index_store {
|
||||
default_index_store.reinit();
|
||||
let repo = repo.reload_at(repo.operation());
|
||||
let index_impl: &ReadonlyIndexWrapper = repo
|
||||
.readonly_index()
|
||||
.as_any()
|
||||
.downcast_ref()
|
||||
.expect("Default index should be a ReadonlyIndexWrapper");
|
||||
writeln!(
|
||||
ui,
|
||||
"Finished indexing {:?} commits.",
|
||||
repo.index().num_commits()
|
||||
index_impl.stats().num_commits
|
||||
)?;
|
||||
} else {
|
||||
return Err(user_error(format!(
|
||||
|
|
Loading…
Reference in a new issue