annex.largefiles: Add support for mimetype=text/* etc, when git-annex is linked with libmagic.

This commit is contained in:
Joey Hess 2016-02-03 16:29:34 -04:00
parent 86444fe507
commit 5127cb59cc
Failed to extract signature
8 changed files with 78 additions and 11 deletions

View file

@ -50,6 +50,8 @@ The following terms can be used in annex.largefiles:
Specify files to include or exclude.
The glob can contain `*` and `?` to match arbitrary characters.
* `smallerthan=size` / `largerthan=size`
Matches only files smaller than, or larger than the specified size.
@ -57,6 +59,17 @@ The following terms can be used in annex.largefiles:
The size can be specified with any commonly used units, for example,
"0.5 gb" or "100 KiloBytes"
* `mimetype=glob`
Looks up the MIME type of a file, and checks if the glob matches it.
For example, "mimetype=text/*" will match many varieties of text files,
including "text/plain", but also "text/x-shellscript", "text/x-makefile",
etc.
This is only available to use when git-annex was built with the
MagicMime build flag.
* `anything`
Matches any file.