comment and todo

This commit is contained in:
Joey Hess 2024-02-27 12:44:34 -04:00
parent affeccdb65
commit df7230deac
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 41 additions and 0 deletions

View file

@ -0,0 +1,12 @@
[[!comment format=mdwn
username="joey"
subject="""comment 1"""
date="2024-02-27T16:16:31Z"
content="""
That file was created by a git-annex copy to the special remote that was
interrupted before it finished. It's safe to remove it.
`git-annex unused` can't detect these kinds of things on special remotes
(though it can in git-annex repositories). I do think it would be good if
it were able to. Opened [[todo/improve_unused_for_special_remotes]].
"""]]

View file

@ -0,0 +1,29 @@
A remote like the directory special remote can have objects that have not
been fully transferred to it by an interrupted copy, that linger until the
copy is re-run and the content gets fully sent to the remote. It would be
good if `git-annex unused` could find and clean up such things, like it
does for incomplete transfers into a git-annex repository.
In the directory special remote, these are files named "tmp/$key/$key".
This would need to be an extension to the remote interface to add an action
to find when a key has such a file, and an action to delete one of them.
A problem is that any such file might actually still be in the process
of being sent, perhaps from a different repository than the one where
`git-annex unused` is being run. So deleting such a file could cause that
transfer to fail. This problem seems unavoidable generally.
----
It's also possible for a special remote to get keys stored in it which
git-annex does not know about. For example, in a temporary clone of the
git-annex repository, add a new file. Send it to the special remote. Then
delete the temporary clone.
`git-annex unused --from` can't detect those keys, because it can only ask
the special remote about presence of keys that it knows about.
Might it be possible to solve both problems together? Eg, add an action
that has the special remote list all keys and partial keys present in it.
--[[Joey]]