git-annex/doc/git-annex-find
Joey Hess f8bc208e89
findkeys: New command, very similar to git-annex find but operating on keys
I've long been asked for `git-annex find --all` or something like that,
but pushed back on it because I feel that the command is analagous to
find(1) and so it would be surprising for it to list keys rather than
files. So instead, add a new findkeys subcommand.

Note that the use of withKeyOptions is rather strange because usually
that is used to fall back to --all rather than listing files, but here
it's made to default to --all like behavior and never list files.

A performance thing that could be improved is that withKeyOptions
always reads and caches location logs. But findkeys with no options does
not need them, so it could be made faster. That caching does speed up
options like --in though. This is really just a subset of a more general
performance thing that --all reads location logs sometimes unncessarily.
Anyway, it needs to read the location log in order to checkDead,
and it seems good that findkeys does skip dead keys.

Also, cleaned up comments on git-annex-find man page asking for --all
option.

Sponsored-by: Dartmouth College's DANDI project
2023-01-17 14:51:57 -04:00
..
comment_6_8d931c135df8f9eba201a3dbb94af87e._comment Added a comment: Find (and other operations) over multiple repos 2019-02-25 14:33:27 +00:00
comment_7_b9d4cc7438ce5dbe22b62e9decc6cbee._comment Added a comment: find wanted on remote? 2020-04-16 21:19:44 +00:00
comment_8_d5846a41e2e227569d7d90dbb8edf7d8._comment Added a comment: "dry run" option 2020-04-21 19:04:07 +00:00