ok/jj
1
0
Fork 0
forked from mirrors/jj

working_copy: don't send unchanged file states over channel

This doesn't seem to make any difference right now, but it will if we
write the state file when there are mtime-only changes, which we
currently don't do.
This commit is contained in:
Martin von Zweigbergk 2023-08-22 10:18:57 -07:00 committed by Martin von Zweigbergk
parent 1221e306a1
commit 5641ef9a42

View file

@ -836,9 +836,11 @@ impl TreeState {
.send((tracked_path.clone(), tree_value))
.ok();
}
if new_file_state != current_file_state {
file_states_tx.send((tracked_path, new_file_state)).ok();
}
}
}
} else {
let directory_to_visit = DirectoryToVisit {
dir: path,
@ -892,10 +894,12 @@ impl TreeState {
if let Some(tree_value) = update {
tree_entries_tx.send((path.clone(), tree_value)).ok();
}
if Some(&new_file_state) != maybe_current_file_state {
file_states_tx.send((path, new_file_state)).ok();
}
}
}
}
Ok(())
},
)?;