diff options
author | Andrew Gallant <jamslam@gmail.com> | 2020-03-16 18:47:46 -0400 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2020-03-16 18:50:02 -0400 |
commit | 34edb8123a0b7bd69a61cd237fec8c1b26a3f786 (patch) | |
tree | 81d85327eb2cd9bff1fb2663ee1766483f3fb65b /crates | |
parent | 5b30c2aed60ee8a57f438e4c981a68c3bf3bc0ff (diff) |
ignore: squash noisy error message
We should not assume that the commondir file actually exists. If it
doesn't, then just move on. This otherwise emits an error message when
searching normal submodules, which is not OK.
This regression was introduced in #1446.
Fixes #1520
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ignore/src/dir.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/crates/ignore/src/dir.rs b/crates/ignore/src/dir.rs index 83a1faf9..fbce80d5 100644 --- a/crates/ignore/src/dir.rs +++ b/crates/ignore/src/dir.rs @@ -310,7 +310,7 @@ impl Ignore { git_global_matcher: self.0.git_global_matcher.clone(), git_ignore_matcher: gi_matcher, git_exclude_matcher: gi_exclude_matcher, - has_git: has_git, + has_git, opts: self.0.opts, }; (ig, errs.into_error_option()) @@ -817,9 +817,7 @@ fn resolve_git_commondir( let git_commondir_file = || real_git_dir.join("commondir"); let file = match File::open(git_commondir_file()) { Ok(file) => io::BufReader::new(file), - Err(err) => { - return Err(Some(Error::Io(err).with_path(git_commondir_file()))); - } + Err(_) => return Err(None), }; let commondir_line = match file.lines().next() { Some(Ok(line)) => line, |