add "nothing" to preferred content DSL

Same as "not anything"; will be particularly useful in annex.largefiles
gitattributes.
This commit is contained in:
Joey Hess 2016-02-02 14:42:13 -04:00
parent 06cf5efae7
commit e8fc2ff27c
Failed to extract signature
4 changed files with 7 additions and 0 deletions

View file

@ -74,6 +74,7 @@ parseToken matchstandard matchgroupwanted checkpresent checkpreferreddir getgrou
| t == "inpreferreddir" = use checkpreferreddir
| t == "unused" = Right $ Operation limitUnused
| t == "anything" = Right $ Operation limitAnything
| t == "nothing" = Right $ Operation limitNothing
| otherwise = maybe (Left $ "near " ++ show t) use $ M.lookup k $
M.fromList
[ ("include", limitInclude)

1
debian/changelog vendored
View file

@ -5,6 +5,7 @@ git-annex (6.20160127) UNRELEASED; urgency=medium
* Fix reversion in lookupkey, contentlocation, and examinekey which
caused them to sometimes output side messages.
* webapp: Fix deletion of current repository directory.
* Added "nothing" to preferred content expression syntax.
-- Joey Hess <id@joeyh.name> Thu, 28 Jan 2016 13:53:09 -0400

View file

@ -218,6 +218,10 @@ elsewhere to allow removing it).
Matches any version of any file.
* `nothing`
Matches nothing. (Same as "not anything")
* `not expression`
Inverts what the expression matches. For example, `not include=archive/*`

View file

@ -58,6 +58,7 @@ it assumes all files that are currently present are preferred content.
Here are recent changes to preferred content expressions, and the version
they were added in.
* "nothing" 6.201600202
* "anything" 5.20150616
* "standard" 5.20140314
(only when used in a more complicated expression; "standard" by