--anything and --nothing
Added --anything (and --nothing). Eg, git-annex find --anything will list all annexed files whether or not the content is present. This is slightly faster and clearer than --include=* or --exclude=* While I can't imagine how --nothing will be used, preferred content expressions already had anything and nothing, so might as well support both as matching options as well. Sponsored-by: Dartmouth College's Datalad project
This commit is contained in:
parent
9d60385001
commit
0b2dd374d8
7 changed files with 60 additions and 2 deletions
|
@ -6,3 +6,5 @@ I found no other way to make `find` (or `findref`) to do what is needed. So I fe
|
|||
|
||||
[[!meta author=yoh]]
|
||||
[[!tag projects/datalad]]
|
||||
|
||||
> [[done]]; added --anything (and --nothing). --[[Joey]]
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
[[!comment format=mdwn
|
||||
username="joey"
|
||||
subject="""comment 1"""
|
||||
date="2022-12-20T19:21:34Z"
|
||||
content="""
|
||||
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..)
|
||||
"""]]
|
Loading…
Add table
Add a link
Reference in a new issue