mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-11-16 01:07:09 +00:00
What the heck?
This commit is contained in:
parent
5611a5768a
commit
a2020c6457
11
src/dir.rs
11
src/dir.rs
@ -102,12 +102,11 @@ impl Git {
|
||||
/// path that gets passed in. This is used for getting the status of
|
||||
/// directories, which don't really have an 'official' status.
|
||||
fn dir_status(&self, dir: &Path) -> String {
|
||||
let status = self.statuses.iter()
|
||||
.filter(|p| p.0.starts_with(dir.as_vec()))
|
||||
.fold(git2::Status::empty(), |a, b| a | b.1);
|
||||
match status {
|
||||
s => format!("{}{}", Git::index_status(s), Git::working_tree_status(s)),
|
||||
}
|
||||
let s = self.statuses.iter()
|
||||
.filter(|p| p.0.starts_with(dir.as_vec()))
|
||||
.fold(git2::Status::empty(), |a, b| a | b.1);
|
||||
|
||||
format!("{}{}", Git::index_status(s), Git::working_tree_status(s))
|
||||
}
|
||||
|
||||
/// The character to display if the file has been modified, but not staged.
|
||||
|
Loading…
Reference in New Issue
Block a user