mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-29 23:57:51 +00:00
annotate: simplify condition when to exit early from process_commits() loop
This commit is contained in:
parent
750326a984
commit
53af8a1fbc
1 changed files with 2 additions and 2 deletions
|
@ -136,7 +136,6 @@ fn process_commits(
|
|||
.evaluate_programmatic(repo)
|
||||
.map_err(|e| e.expect_backend_error())?;
|
||||
|
||||
let num_lines = starting_source.line_map.len();
|
||||
let mut commit_source_map = HashMap::from([(starting_commit_id.clone(), starting_source)]);
|
||||
let mut original_line_map = HashMap::new();
|
||||
|
||||
|
@ -150,7 +149,8 @@ fn process_commits(
|
|||
&commit_id,
|
||||
&edge_list,
|
||||
)?;
|
||||
if original_line_map.len() >= num_lines {
|
||||
if commit_source_map.is_empty() {
|
||||
// No more lines to propagate to ancestors.
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue