aboutsummaryrefslogtreecommitdiff
path: root/doc/tips/largefiles.mdwn
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-02-03 14:56:34 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-02-03 15:04:42 -0400
commit11c3a7cd331f7b07e62493a4e8e37e0cecffc5b0 (patch)
tree746fb1ccdfe06f8eb093a0d2d4a2757a8090d3e3 /doc/tips/largefiles.mdwn
parent01c701b5a5c18cfa952394ae1cbd2249cfd08f51 (diff)
Limit annex.largefiles parsing to the subset of preferred content expressions that make sense in its context.
So, not "standard" or "lackingcopies", etc.
Diffstat (limited to 'doc/tips/largefiles.mdwn')
-rw-r--r--doc/tips/largefiles.mdwn42
1 files changed, 34 insertions, 8 deletions
diff --git a/doc/tips/largefiles.mdwn b/doc/tips/largefiles.mdwn
index ec51ecf66..c07d7f3f2 100644
--- a/doc/tips/largefiles.mdwn
+++ b/doc/tips/largefiles.mdwn
@@ -42,19 +42,45 @@ checkouts behave differently. The git configuration overrides the
## syntax
+The value of annex.largefiles is similar to a
+[[preferred content expression|git-annex-preferred-content]].
+The following terms can be used in annex.largefiles:
+
+* `include=glob` / `exclude=glob`
+
+ Specify files to include or exclude.
+
+* `smallerthan=size` / `largerthan=size`
+
+ Matches only files smaller than, or larger than the specified size.
+
+ The size can be specified with any commonly used units, for example,
+ "0.5 gb" or "100 KiloBytes"
+
+* `anything`
+
+ Matches any file.
+
+* `nothing`
+
+ Matches no files. (Same as "not anything")
+
+* `not expression`
+
+ Inverts what the expression matches.
+
+* `and` / `or` / `( expression )`
+
+ These can be used to build up more complicated expressions.
+
The way the `.gitattributes` example above works is, `*.c` and `*.h` files
-have the annex.largefiles attribute set to "nothing", which matches nothing,
+have the annex.largefiles attribute set to "nothing",
and so those files are never treated as large files. All other files use
the other value, which checks the file size.
-The value of annex.largefiles is a
-[[preferred content expression|git-annex-preferred-content]] that is
-used to match the large files.
-
Note that, since git attribute values cannot contain whitespace,
-it's useful to instead parenthesize the terms of the
-[[preferred content expression|git-annex-preferred-content]]. This trick
-allows setting the annex.largefiles attribute to more complicated expressions.
+it's useful to instead parenthesize the terms of the annex.largefiles
+attribute. This trick allows for more complicated expressions.
For example, this is the same as the git config shown earlier, shoehorned
into a git attribute: