summaryrefslogtreecommitdiff
path: root/doc/git-annex.mdwn
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-02-19 15:10:18 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-02-19 16:29:56 -0400
commiteaf19cc8c9be6e53c0ae7a1fba48a947c41d2ee6 (patch)
treebac64b7fde8afb83661ac5384a2181cb91bd0926 /doc/git-annex.mdwn
parent22b8d9c7603d6ed610ed9bbc3e59dbdb39e885c5 (diff)
add tip about metadata driven views (and more flexible view filtering)
While writing this documentation, I realized that there needed to be a way to stay in a view like tag=* while adding a filter like tag=work that applies to the same field. So, there are really two ways a view can be refined. It can have a new "field=explicitvalue" filter added to it, which does not change the "shape" of the view, but narrows the files it shows. Or, it can have a new view added, which adds another level of subdirectories. So, added a vfilter command, which takes explicit values to add to the filter, and rejects changes that would change the shape of the view. And, made vadd only accept changes that change the shape of the view. And, changed the View data type slightly; now components that can match multiple metadata values can be visible, or not visible. This commit was sponsored by Stelian Iancu.
Diffstat (limited to 'doc/git-annex.mdwn')
-rw-r--r--doc/git-annex.mdwn28
1 files changed, 20 insertions, 8 deletions
diff --git a/doc/git-annex.mdwn b/doc/git-annex.mdwn
index 23002cb9a..e7183dc87 100644
--- a/doc/git-annex.mdwn
+++ b/doc/git-annex.mdwn
@@ -722,10 +722,10 @@ subdirectories).
shown in the view.
Multiple values for a metadata field can be specified, either by using
- a glob (field="\*") or by listing each wanted value. The resulting view
+ a glob (`field="*"`) or by listing each wanted value. The resulting view
will put files in subdirectories according to the value of their fields.
-
- Once within a view, you can make additional subdirectories, and
+
+ Once within a view, you can make additional directories, and
copy or move files into them. When you commit, the metadata will
be updated to correspond to your changes.
@@ -736,16 +736,28 @@ subdirectories).
The optional number tells how many views to pop.
-* `vadd [field=value ...] [tag ...]`
+* `vfilter [field=value ...] [tag ...]`
+
+ Filters the current view to only the files that have the
+ specified values and tags.
+
+* `vadd [field=glob ...]`
- Refines the currently checked out view branch, adding additional fields
- or tags.
+ Changes the current view, adding an additional level of directories
+ to categorize the files.
+
+ For example, when the view is by author/tag, `vadd year=*` will
+ change it to year/author/tag.
+
+ So will `vadd year=2014 year=2013`, but limiting the years in view
+ to only those two.
* `vcycle`
When a view involves nested subdirectories, this cycles the order.
- For example, when the view has date/author/tag, vcycle will switch
- it to author/tag/date.
+
+ For example, when the view is by year/author/tag, `vcycle` will switch
+ it to author/tag/year.
# UTILITY COMMANDS