diff --git a/doc/bugs/make___39__find__39___clear__40__er__41___on_what_is_unlocked_.mdwn b/doc/bugs/make___39__find__39___clear__40__er__41___on_what_is_unlocked_.mdwn new file mode 100644 index 0000000000..201112fc5e --- /dev/null +++ b/doc/bugs/make___39__find__39___clear__40__er__41___on_what_is_unlocked_.mdwn @@ -0,0 +1,63 @@ +`git annex find --unlocked` reports also not just files which are known to `git-annex` as unlocked, but also files which were regular "locked" (symlinks) but are modified in the tree: + + +
+here is a reproducer script + +```shell +#!/bin/bash + +cd "$(mktemp -d ${TMPDIR:-/tmp}/dl-XXXXXXX)" +set -eu + +git init +git annex init + +echo 123 > 123 +git annex add 123 +git commit -m 'commit 123 locked' +git annex unlock 123 +git commit -m 'commit 123 unlocked' 123 + +set -x +git annex find --unlocked # should show 123 + +git status # should show all clean + +# let's create another file which we just modify + +echo 124 > 124 +git annex add 124 +git commit -m 'committing 124 locked' 124 +rm 124 +touch 124 + +git annex find --unlocked # will report both 123 and 124 +git status + +``` +
+ +which with git-annex `8.20211231+git140-gc3817495f-1~ndall+1` would produce at the end + +``` ++ git commit -m 'committing 124 locked' 124 +[master b58274c] committing 124 locked + 1 file changed, 1 insertion(+) + create mode 120000 124 ++ rm 124 ++ touch 124 ++ git annex find --unlocked +123 +124 ++ git status +On branch master +Changes not staged for commit: + (use "git add ..." to update what will be committed) + (use "git restore ..." to discard changes in working directory) + typechange: 124 + +no changes added to commit (use "git add" and/or "git commit -a") +``` + +and I do not think it should report `124` as unlocked. Or is there some `find` way to search only for "truly unlocked" files?