initial implementation of --explain
authorJoey Hess <joeyh@joeyh.name>
Tue, 25 Jul 2023 20:11:06 +0000 (16:11 -0400)
committerJoey Hess <joeyh@joeyh.name>
Tue, 25 Jul 2023 20:52:57 +0000 (16:52 -0400)
commitf25eeedeac005dad7a21ecfa7c44a42282f30faf
tree3e06d5c5ef318d017c75d4c0923d1a77d5b3bedd
parentcf40e2d4b6dcf545d53c5a1c026faff2fc165b65
initial implementation of --explain

Currently it only displays explanations of options like --in and --copies.

In the future, it should explain preferred content expression evaluation
and other decisions.

The explanations of a few things could be better. In particular,
"standard" will just appear as-is (or as "!standard" if it doesn't
match), rather than explaining why the standard preferred content expression
for the group matches or not.

Currently as implemented, it goes to stdout, and so commands like
git-annex find that have custom output will not display --explain
information. Perhaps that should change, dunno.

Sponsored-by: Dartmouth College's DANDI project
12 files changed:
Annex.hs
Annex/FileMatcher.hs
CHANGELOG
CmdLine/GitAnnex/Options.hs
CmdLine/Option.hs
Database/Handle.hs
Limit.hs
Limit/Wanted.hs
Messages.hs
Types/FileMatcher.hs
Utility/Matcher.hs
doc/git-annex-common-options.mdwn