Explorar o código

fix(no-git): respect git-repos flags

Signed-off-by: Christina Sørensen <christina@cafkafk.com>
Christina Sørensen %!s(int64=2) %!d(string=hai) anos
pai
achega
984ba42273
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      src/options/view.rs

+ 2 - 2
src/options/view.rs

@@ -220,8 +220,8 @@ impl Columns {
         let time_types = TimeTypes::deduce(matches)?;
 
         let git = matches.has(&flags::GIT)? && !matches.has(&flags::NO_GIT)?;
-        let subdir_git_repos = matches.has(&flags::GIT_REPOS)?;
-        let subdir_git_repos_no_stat = !subdir_git_repos && matches.has(&flags::GIT_REPOS_NO_STAT)?;
+        let subdir_git_repos = matches.has(&flags::GIT_REPOS)? && !matches.has(&flags::NO_GIT)?;
+        let subdir_git_repos_no_stat = !subdir_git_repos && matches.has(&flags::GIT_REPOS_NO_STAT)? && !matches.has(&flags::NO_GIT)?;
 
         let blocksize        = matches.has(&flags::BLOCKSIZE)?;
         let group            = matches.has(&flags::GROUP)?;