From 9ed537b3e84cc3bb4e9ff58d4c68d65ad4fcddbe Mon Sep 17 00:00:00 2001 From: Martin von Zweigbergk Date: Wed, 22 Mar 2023 18:29:46 -0700 Subject: [PATCH] cli: leverage `RevsetIteratorExt::commits()` in `jj log` I'm trying to remove uses of `IndexEntry`. --- src/commands/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/mod.rs b/src/commands/mod.rs index 8773f936e..7457b5dd7 100644 --- a/src/commands/mod.rs +++ b/src/commands/mod.rs @@ -1568,8 +1568,8 @@ fn cmd_log(ui: &mut Ui, command: &CommandHelper, args: &LogArgs) -> Result<(), C } else { Box::new(revset.iter()) }; - for index_entry in iter { - let commit = store.get_commit(&index_entry.commit_id())?; + for commit_or_error in iter.commits(store) { + let commit = commit_or_error?; with_content_format .write(formatter, |formatter| template.format(&commit, formatter))?; if !diff_formats.is_empty() {