summaryrefslogtreecommitdiffstats
path: root/src/dir.rs
diff options
context:
space:
mode:
authorBen S <ogham@bsago.me>2015-05-10 17:57:21 +0100
committerBen S <ogham@bsago.me>2015-05-10 17:57:21 +0100
commitd9319c48b427881a197d96a15b941534646f42ac (patch)
tree0f6a5bfd26a7fb2a8b017ba542026bbc68cc14bb /src/dir.rs
parent5a37d1b6b16e72c0661d3a465ab1c56f458384d8 (diff)
Do the same for the Git column
Diffstat (limited to 'src/dir.rs')
-rw-r--r--src/dir.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/dir.rs b/src/dir.rs
index f8f517f..3685329 100644
--- a/src/dir.rs
+++ b/src/dir.rs
@@ -1,3 +1,4 @@
+use colours::Colours;
use feature::Git;
use file::{File, GREY};
@@ -64,10 +65,10 @@ impl Dir {
}
/// Get a string describing the Git status of the given file.
- pub fn git_status(&self, path: &Path, prefix_lookup: bool) -> String {
+ pub fn git_status(&self, path: &Path, colours: &Colours, prefix_lookup: bool) -> String {
match (&self.git, prefix_lookup) {
- (&Some(ref git), false) => git.status(path),
- (&Some(ref git), true) => git.dir_status(path),
+ (&Some(ref git), false) => git.status(colours, path),
+ (&Some(ref git), true) => git.dir_status(colours, path),
(&None, _) => GREY.paint("--").to_string(),
}
}