mirror of
https://github.com/martinvonz/jj.git
synced 2025-05-29 02:51:12 +00:00
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:
parent
1221e306a1
commit
5641ef9a42
@ -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(())
|
||||
},
|
||||
)?;
|
||||
|
Loading…
x
Reference in New Issue
Block a user