[[!comment format=mdwn
 username="disteph@02005197c6b0e3d92255823d62c08dbe6d7a4d52"
 nickname="disteph"
 avatar="http://cdn.libravatar.org/avatar/a12e6e0852d5a1985b8684b17202561c"
 subject="comment 4"
 date="2018-10-18T08:25:34Z"
 content="""
> You can use `git annex findref master` in a bare repository, which is like find but operates on some branch.
>
> I am not convinced that find --all would really be that useful, since it would have to display keys and not filenames, and find is all about displaying filenames. I did make find error out in a bare repo rather than not doing anything.

Thanks for the quick answer and for the tip. `findref` still displays file names, so OK, I can pipe the output with `lookupkey` to have the corresponding list of keys. Still, my understanding is that the computation is not the same as a potential `find --all` (or `find` on bare repos), in the sense that commands like `move --all` (or `move` on bare repos) only scan the files that are present in the repo, whereas `git annex findref master` looks at the whole branch regardless of where the files are. Sure, I can filter it with `findref master --in=here`, but the computational cost wouldn't be the same, would it? (imagining that my repo contains orders of magnitude fewer files than the branch) Also, `move --all` catches past versions of files that are still in the repo, i.e. \"unused files\", whereas I guess `findref master --in=here` would miss them? It's just that commands like `move --all` start by doing the job I want before taking an action on the files, so I just wish there was a \"no-action\" version of them. A `--dry-run` option in `move` and `copy` would be good enough. I tried to trick the `move` command with a `move --all ... --from=here --to=here` but of course I was outsmarted by the command :-)
"""]]
