summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-02-02 14:42:13 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-02-02 14:42:13 -0400
commit81457e02ddf833df56112a8afaf25f57ecd07076 (patch)
treee6e79fa65773e8c12ecc0112087c4b8b7c17274b
parent361c08cac70ca03d43e729d93daccdde1e1141b4 (diff)
add "nothing" to preferred content DSL
Same as "not anything"; will be particularly useful in annex.largefiles gitattributes.
-rw-r--r--Annex/FileMatcher.hs1
-rw-r--r--debian/changelog1
-rw-r--r--doc/git-annex-preferred-content.mdwn4
-rw-r--r--doc/preferred_content.mdwn1
4 files changed, 7 insertions, 0 deletions
diff --git a/Annex/FileMatcher.hs b/Annex/FileMatcher.hs
index f1936bce9..a8e431acf 100644
--- a/Annex/FileMatcher.hs
+++ b/Annex/FileMatcher.hs
@@ -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)
diff --git a/debian/changelog b/debian/changelog
index ffe840aa7..b3491f63c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -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
diff --git a/doc/git-annex-preferred-content.mdwn b/doc/git-annex-preferred-content.mdwn
index 8ac8df022..c8c5d06af 100644
--- a/doc/git-annex-preferred-content.mdwn
+++ b/doc/git-annex-preferred-content.mdwn
@@ -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/*`
diff --git a/doc/preferred_content.mdwn b/doc/preferred_content.mdwn
index 26db05491..f8c6ce6cd 100644
--- a/doc/preferred_content.mdwn
+++ b/doc/preferred_content.mdwn
@@ -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