From e8fc2ff27c93d81fae8d2f0a55e28b21ffaa7114 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 2 Feb 2016 14:42:13 -0400 Subject: [PATCH] add "nothing" to preferred content DSL Same as "not anything"; will be particularly useful in annex.largefiles gitattributes. --- Annex/FileMatcher.hs | 1 + debian/changelog | 1 + doc/git-annex-preferred-content.mdwn | 4 ++++ doc/preferred_content.mdwn | 1 + 4 files changed, 7 insertions(+) diff --git a/Annex/FileMatcher.hs b/Annex/FileMatcher.hs index f1936bce9a..a8e431acfc 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 ffe840aa7b..b3491f63c2 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 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 8ac8df022f..c8c5d06afe 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 26db05491a..f8c6ce6cd8 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