required: New command, like wanted, but for required content.

Also refactored some code to reduce duplication.
This commit is contained in:
Joey Hess 2015-04-18 16:04:25 -04:00
parent c3732bddda
commit ef2202fd94
8 changed files with 55 additions and 39 deletions

View file

@ -10,6 +10,13 @@ using `git annex vicfg` or `git annex wanted`.
They are used by the `--auto` option, by `git annex sync --content`,
and by the git-annex assistant.
While preferred content expresses a preference, it can be overridden
by simply using `git annex drop`. On the other hand, required content
settings are enforced; `git annex drop` will refuse to drop a file if
doing so would violate its required content settings. A repository's
required content can be configured using `git annex vicfg` or
`git annex required`.
Preferred content expressions are similar, but not identical to
the [[git-annex-matching-options]](1), just without the dashes.
For example:

View file

@ -264,8 +264,16 @@ subdirectories).
* `groupwanted groupname [expression]`
Get or set groupwanted expression.
See [[git-annex-groupwanted]](1) for details.
* `required repository [expression]`
Get or set required content expression.
See [[git-annex-required]](1) for details.
* `schedule repository [expression]`
Get or set scheduled jobs.

View file

@ -6,7 +6,8 @@ archival repositories, and also require that one copy be stored offsite.
The format of required content expressions is the same as
[[preferred_content]] expressions.
Required content settings can be edited using `git annex vicfg`.
Required content settings can be edited using `git annex vicfg`
or set using `git annex required`.
Each repository can have its own settings, and other repositories will
try to honor those settings when interacting with it.

View file

@ -9,3 +9,5 @@ used feature, and vicfg can already configure it.
one when it comes to that. Oh well.)
--[[Joey]]
> [[done]] --[[Joey]]