git-annex/doc/todo/Adding_unmatched_files_to_a_view.mdwn
Joey Hess aa0350ff49
add directory to views for files that lack specified metadata
* view: New field?=glob and ?tag syntax that includes a directory "_"
  in the view for files that do not have the specified metadata set.
* Added annex.viewunsetdirectory git config to change the name of the
  "_" directory in a view.

When in a view using the new syntax, old git-annex will fail to parse the
view log. It errors with "Not in a view.", which is not ideal. But that
only affects view commands.

annex.viewunsetdirectory is included in the View for a couple of reasons.
One is to avoid needing to warn the user that it should not be changed when
in a view, since that would confuse git-annex. Another reason is that it
helped with plumbing the value through to some pure functions.

annex.viewunsetdirectory is actually mangled the same as any other view
directory. So if it's configured to something like "N/A", there won't be
multiple levels of directories, which would also confuse git-annex.

Sponsored-By: Jack Hill on Patreon
2023-02-07 16:28:46 -04:00

15 lines
1,009 B
Markdown

Hey joey,
👀 Views are **really** cool, thanks again for this great idea. It makes managing the metadata of annexed files really fun as you can just drag files around and create, rename or delete folders.
What would make it perfect is if there was a possibility to optionally add unmatched files to a view, e.g. into a specially-named folder (like `unmatched`, `___unmatched___` or `?????` or even configurable). Otherwise, unmatched files are not accessible from the view, so they can't be sorted into metadata from there.
Currently this is possible by default-setting the field you want to view with `git annex metadata --force --set 'myfield?=???'`. Then, these objects will appear in the `???` folder with `git annex view myfield='*'`. But that forcefully adds a value to the field, which might not be desired.
What do you think? Is something like `git annex view --show-unmatched '???'` worth it?
Thanks again for git-annex, I love it, it's so versatile... 💛
Yann
> [[fixed|done]] --[[Joey]]