mirror of
https://github.com/martinvonz/jj.git
synced 2025-02-07 13:00:08 +00:00
working_copy: don't stat ignored files
This commit is contained in:
parent
76c58b3949
commit
bf61e9cf3e
1 changed files with 9 additions and 5 deletions
|
@ -346,17 +346,21 @@ impl TreeState {
|
||||||
} else {
|
} else {
|
||||||
let disk_file = disk_dir.join(file_name);
|
let disk_file = disk_dir.join(file_name);
|
||||||
deleted_files.remove(&sub_path);
|
deleted_files.remove(&sub_path);
|
||||||
|
let current_file_state = self.file_states.get(&sub_path);
|
||||||
|
if current_file_state.is_none()
|
||||||
|
&& git_ignore.matches_file(&sub_path.to_internal_file_string())
|
||||||
|
{
|
||||||
|
// If it wasn't already tracked and it matches the ignored paths, then
|
||||||
|
// ignore it.
|
||||||
|
continue;
|
||||||
|
}
|
||||||
let new_file_state = self.file_state(&entry.path()).unwrap();
|
let new_file_state = self.file_state(&entry.path()).unwrap();
|
||||||
let clean;
|
let clean;
|
||||||
let executable;
|
let executable;
|
||||||
match self.file_states.get(&sub_path) {
|
match current_file_state {
|
||||||
None => {
|
None => {
|
||||||
// untracked
|
// untracked
|
||||||
if git_ignore.matches_file(&sub_path.to_internal_file_string()) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
clean = false;
|
clean = false;
|
||||||
|
|
||||||
executable = new_file_state.file_type == FileType::Executable;
|
executable = new_file_state.file_type == FileType::Executable;
|
||||||
}
|
}
|
||||||
Some(current_entry) => {
|
Some(current_entry) => {
|
||||||
|
|
Loading…
Reference in a new issue