Original discussion and need is within datalad/issues/7038 -- we had been using annex find
and annex findref
with --copies 0
to simply force those two commands to return information for all keys used in the current tree, regardless of their local presence.
Unfortunately as that issue shows, adding --copies 0
results in significant run time penalty over a run without it, or some different invocation with similar (albeit not as generic, since would miss keys without size) --largerthan -1
.
I found no other way to make find
(or findref
) to do what is needed. So I felt that may be it does need some additional option, or may be some special ad-hoc value for some of the possible "fast" expressions (like --largerthan idonotcare
).
Using --copies necessarily loads up the location tracking log for each file, which does add overhead.
Any other matching option that matches everything will work just as well for you. I think that
git-annex find --include='*'
is the best thing currently available. Indeed, the git-annex-find man page suggests to use that. The only overhead is an unncessary glob match, which should be almost unmeasurable.It does seem like it might be worth adding --anything that simply matches anything. Preferred content expressions already support "anything". And
git-annex find --anything
makes sense and is easier to type.But, you'll probably be better off using
--include='*'
since it works with older versions of git-annex.(--all is the wrong name for such an option since it already has another meaning, although I don't think it makes sense for
git-annex find
to support --all, it has certianly been requested before by people who want to generalize that existing meaning..)