diff options
author | annexuser <annexuser@web> | 2016-11-27 20:39:26 +0000 |
---|---|---|
committer | admin <admin@branchable.com> | 2016-11-27 20:39:26 +0000 |
commit | 687fe308e5d9016c77ede6cef25b643379dc7bf9 (patch) | |
tree | 830b262039d6b3139e57553d7a7a2433f2e05dbd /doc | |
parent | fb90cd6048cfa6b15e513ca363048eda2e52f438 (diff) |
Diffstat (limited to 'doc')
-rw-r--r-- | doc/forum/Preserving_Directories_in_Metadata_Views.mdwn | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/doc/forum/Preserving_Directories_in_Metadata_Views.mdwn b/doc/forum/Preserving_Directories_in_Metadata_Views.mdwn new file mode 100644 index 000000000..dfc45cb4b --- /dev/null +++ b/doc/forum/Preserving_Directories_in_Metadata_Views.mdwn @@ -0,0 +1,47 @@ +I want to use metadata views to sort files into top-level directories based on a tag, but then preserve the directory structure underneath that. I'm having trouble with this. + +Say I have an annex at `~/annex` with a structure like this: + + $ tree + . + ├── foo + │ └── bar + │ ├── one.txt + │ ├── three.txt + │ └── two.txt + └── waldo + └── fred + ├── a.txt + ├── b.txt + └── c.txt + +I tag some of the files with `blah`: + + $ git annex metadata -t blah foo/bar/* + +Now I want to change my view to only see those files with a certain tag, but I want to maintain their directory structure, ie I want to end up with something like this: + + $ tree + . + ├── blah + │ └── foo + │ └── bar + │ ├── one.txt + │ ├── three.txt + │ └── two.txt + +If I do `git annex view blah` I see the files `one.txt`, `two.txt` and `three.txt` but they are in the top level of `~/annex`. The `foo` and `bar` directories are not present. + +If I do `git annex view blah "/=*"` then the files I present under the `foo` directory, but the `bar` subdirectory is not there. + +It would also be fine if I could just hide the files that did not have the `blah` tag, so that I ended up with this: + + $ tree + . + ├── foo + │ └── bar + │ ├── one.txt + │ ├── three.txt + │ └── two.txt + +Is something like this possible? |