f8e940eb8e
The current manual mode preferred content expression is: "present and (((exclude=*/archive/* and exclude=archive/*) or (not (copies=archive:1 or copies=smallarchive:1))) or (not copies=semitrusted+:1))" The old matcher misparsed this, to basically: OR (present and (...)) (not copies=semitrusted+:1)) The paren handling and indeed the whole conversion from tokens to the matcher was just wrong. The new way may not be the cleverest, but I think it is correct, and you can see how it pattern matches structurally against the expressions when parsing them. That expression is now parsed to: MAnd (MOp <function>) (MOr (MOr (MAnd (MOp <function>) (MOp <function>)) (MNot (MOr (MOp <function>) (MOp <function>)))) (MNot (MOp <function>))) Which appears correct, and behaves correct in testing. Also threw in a simplifier, so the final generated Matcher has less unnecessary clutter in it. Mostly so that I could more easily read & confirm them. Also, added a simple test of the Matcher to the test suite. There is a small chance of badly formed preferred content expressions behaving differently than before due to this rewrite. |
||
---|---|---|
.. | ||
Android | ||
android | ||
assistant | ||
backends | ||
bare_repositories | ||
bugs | ||
design | ||
direct_mode | ||
download | ||
encryption | ||
footer | ||
forum | ||
install | ||
internals | ||
license | ||
links | ||
news | ||
not | ||
preferred_content | ||
special_remotes | ||
sync | ||
templates | ||
tips | ||
todo | ||
upgrades | ||
use_case | ||
users | ||
videos | ||
walkthrough | ||
Android.mdwn | ||
assistant.mdwn | ||
backends.mdwn | ||
bare_repositories.mdwn | ||
bugs.mdwn | ||
coding_style.mdwn | ||
comments.mdwn | ||
contact.mdwn | ||
copies.mdwn | ||
design.mdwn | ||
direct_mode.mdwn | ||
distributed_version_control.mdwn | ||
download.mdwn | ||
encryption.mdwn | ||
favicon.ico | ||
feeds.mdwn | ||
forum.mdwn | ||
future_proofing.mdwn | ||
git-annex-shell.mdwn | ||
git-annex.mdwn | ||
git-union-merge.mdwn | ||
how_it_works.mdwn | ||
index.mdwn | ||
install.mdwn | ||
internals.mdwn | ||
license.mdwn | ||
location_tracking.mdwn | ||
logo-bw.svg | ||
logo.png | ||
logo.svg | ||
logo_small.png | ||
meta.mdwn | ||
news.mdwn | ||
not.mdwn | ||
preferred_content.mdwn | ||
related_software.mdwn | ||
repomap.png | ||
scalability.mdwn | ||
sidebar.mdwn | ||
sitemap.mdwn | ||
special_remotes.mdwn | ||
summary.mdwn | ||
sync.mdwn | ||
testimonials.mdwn | ||
tips.mdwn | ||
todo.mdwn | ||
transferring_data.mdwn | ||
trust.mdwn | ||
upgrades.mdwn | ||
users.mdwn | ||
videos.mdwn | ||
walkthrough.mdwn |