Hello, I would like to know if there is any way to specifically list the locked or unlocked annexed files in a git annex. I looked at the git-annex-lock, git-annex-find, and git-annex-matching-options pages and even the discussion about the unlocked files but I didn't find anything.
I know it wouldn't make any sens for the older versions, but in the v6 mode, I think it might be useful to add such a shortcut search.
I mean, we can already look for local content with:
git annex find --in=here
so why not create something like
git annex find --locked/unlocked=yes/no
?
Sure it is already more or less doable by looking at symlinks:
#list all broken symlinks (locked absent files ?)
find . -xtype l
#list all symlinks (locked present files ?)
find -L . -xtype l
#list all files that aren't symlinks (unlocked files ?)
find . -type -f
But it is also possible for any symlink or file not to be part of the annex. So, in order to find the locked/unlocked files, it would require to intersect the previous sets of files with the set of annexed ones.
Am I missing any easy tip or command argument to do this ?
git status
only finds unlocked files that have recently been unlocked but not committed. (In v5 there were no other kind, but it won't find them all in v7.)I've added a --unlocked option to find them.