--- /dev/null
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 11"""
+ date="2021-05-21T20:26:39Z"
+ content="""
+Started a branch `trackassociated` for this. So far, I've gotten the
+associated files to be kept updated with changes to locked files as well as
+unlocked files, and when files are removed it deletes the old associated
+files which did not happen reliably before. Performance impact of this is
+TBD, but it should only slow it down in situations where a large change has
+been made to the index -- eg checking out a very different branch, or
+adding a large number of files.
+
+There is a problem though:
+
+ $ git config annex.addunlocked true
+ $ touch n
+ $ git annex add n
+ $ echo 'select * from associated;' | sqlite3 .git/annex/keysdb/db
+ SHA256E-s0--e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855|n
+ $ git mv n n2
+ $ git annex add n2
+ $ echo 'select * from associated;' | sqlite3 .git/annex/keysdb/db
+ 1|SHA256E-s0--e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855|n
+ 2|SHA256E-s0--e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855|n2
+
+The old filename does not get removed in this case.
+
+Also, git commit currently fails, problem with index locking inside the smudge
+filter, which prevents git write-tree from working. Should be fixable by
+detecting when the index is locked and avoiding updating then.
+"""]]