2016-01-25 20:16:18 +00:00
|
|
|
# NAME
|
|
|
|
|
2016-02-03 20:58:36 +00:00
|
|
|
git-annex matchexpression - checks if an expression matches
|
2016-01-25 20:16:18 +00:00
|
|
|
|
|
|
|
# SYNOPSIS
|
|
|
|
|
|
|
|
git annex matchexpression `expression [data]`
|
|
|
|
|
|
|
|
# DESCRIPTION
|
|
|
|
|
2016-02-03 20:58:36 +00:00
|
|
|
This plumbing-level command is given a preferred content expression,
|
2016-01-25 20:16:18 +00:00
|
|
|
and some data, and checks if the expression matches the data. It exits 0 if
|
|
|
|
it matches, and 1 if not. If not enough data was provided, it displays an
|
|
|
|
error and exits with special code 42.
|
|
|
|
|
|
|
|
For example, this will exit 0:
|
|
|
|
|
|
|
|
git annex matchexpression "include=*.png and largerthan=1mb" --file=foo.png --size=10mb
|
|
|
|
|
|
|
|
# OPTIONS
|
|
|
|
|
|
|
|
* `--file=`
|
|
|
|
|
|
|
|
Provide the filename to match against. Note that the file does not have
|
|
|
|
to actually exist on disk.
|
|
|
|
|
|
|
|
* `--size=`
|
|
|
|
|
|
|
|
Tell what the size of the file is. The size can be specified with any
|
|
|
|
commonly used units, for example, "0.5 gb" or "100 KiloBytes".
|
|
|
|
|
|
|
|
* `--key=`
|
|
|
|
|
|
|
|
Tell what key is being matched against. This is needed for
|
|
|
|
matching expressions like "copies=N" and "metadata=tag=foo" and
|
|
|
|
"present", which all need to look up the information on file for a key.
|
|
|
|
|
|
|
|
Many keys have a known size, and so --size is not needed when specifying
|
|
|
|
such a key.
|
|
|
|
|
2016-02-03 20:58:36 +00:00
|
|
|
* `--largefiles`
|
|
|
|
|
|
|
|
Parse the expression as an annex.largefiles expression, rather than a
|
|
|
|
preferred content expression.
|
|
|
|
|
|
|
|
* `--mimetype=`
|
|
|
|
|
|
|
|
Tell what the mime type of the file is. Only needed when using
|
|
|
|
--largefiles with a mimetype= expression.
|
|
|
|
|
2019-04-30 15:58:06 +00:00
|
|
|
* `--mimeencoding=`
|
|
|
|
|
|
|
|
Tell what the mime encoding of the file is. Only needed when using
|
|
|
|
--largefiles with a mimeencoding= expression.
|
|
|
|
|
2023-07-26 18:34:21 +00:00
|
|
|
* `--explain`
|
|
|
|
|
|
|
|
Display explanation of what parts of the preferred content expression
|
|
|
|
match, and which parts don't match.
|
|
|
|
|
2021-05-10 19:00:13 +00:00
|
|
|
* Also the [[git-annex-common-options]](1) can be used.
|
|
|
|
|
2016-01-25 20:16:18 +00:00
|
|
|
# SEE ALSO
|
|
|
|
|
|
|
|
[[git-annex]](1)
|
|
|
|
|
|
|
|
[[git-annex-preferred-content]](1)
|
|
|
|
|
2019-12-20 19:01:34 +00:00
|
|
|
[[git-annex-matching-expression]](1)
|
|
|
|
|
2024-09-12 20:07:44 +00:00
|
|
|
[[git-annex-sim]](1)
|
|
|
|
|
2016-01-25 20:16:18 +00:00
|
|
|
# AUTHOR
|
|
|
|
|
|
|
|
Joey Hess <id@joeyh.name>
|
|
|
|
|
|
|
|
Warning: Automatically converted into a man page by mdwn2man. Edit with care.
|