mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-16 00:56:23 +00:00
working_copy: don't look up file state twice while visiting directories
This commit is contained in:
parent
bb72def464
commit
c9150d02fc
1 changed files with 2 additions and 2 deletions
|
@ -781,7 +781,8 @@ impl TreeState {
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
let path = dir.join(RepoPathComponent::new(name));
|
let path = dir.join(RepoPathComponent::new(name));
|
||||||
if let Some(file_state) = file_states.get(&path) {
|
let maybe_current_file_state = file_states.get(&path);
|
||||||
|
if let Some(file_state) = maybe_current_file_state {
|
||||||
if file_state.file_type == FileType::GitSubmodule {
|
if file_state.file_type == FileType::GitSubmodule {
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
@ -856,7 +857,6 @@ impl TreeState {
|
||||||
if let Some(progress) = progress {
|
if let Some(progress) = progress {
|
||||||
progress(&path);
|
progress(&path);
|
||||||
}
|
}
|
||||||
let maybe_current_file_state = file_states.get(&path);
|
|
||||||
if maybe_current_file_state.is_none()
|
if maybe_current_file_state.is_none()
|
||||||
&& git_ignore.matches(path.as_internal_file_string())
|
&& git_ignore.matches(path.as_internal_file_string())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue