Mercurial > public > mercurial-scm > hg-stable
comparison rust/hg-core/src/dirstate_tree/status.rs @ 50300:edcc35a4f1dc stable
dirstate: fix the bug in [status] dealing with committed&ignored directories
In particular, these directories can "infect" their sibling directories with
ignored status due to using a shared memoization cell by accident.
This fixes bug #6795.
author | Arseniy Alekseyev <aalekseyev@janestreet.com> |
---|---|
date | Tue, 14 Mar 2023 14:08:38 +0000 |
parents | bae51b50a5cf |
children | 14b57943ae6d |
comparison
equal
deleted
inserted
replaced
50299:97a6d6bdbc08 | 50300:edcc35a4f1dc |
---|---|
242 | 242 |
243 fn force<'b>(&self, ignore_fn: &IgnoreFnType<'b>) -> bool { | 243 fn force<'b>(&self, ignore_fn: &IgnoreFnType<'b>) -> bool { |
244 match self.parent { | 244 match self.parent { |
245 None => false, | 245 None => false, |
246 Some(parent) => { | 246 Some(parent) => { |
247 *(parent.cache.get_or_init(|| { | 247 *(self.cache.get_or_init(|| { |
248 parent.force(ignore_fn) || ignore_fn(self.path) | 248 parent.force(ignore_fn) || ignore_fn(self.path) |
249 })) | 249 })) |
250 } | 250 } |
251 } | 251 } |
252 } | 252 } |