Imagine this situation: You have a laptop and a NAS. On your laptop you want to consume a large media file located on the NAS. So you type:
git annex get --from nas mediafile
But now you have to wait for the download to complete, unless either
- rsync is pointed directly to the file in the object storage ("--inplace") or
- the symlink temporarily points to the partial file during a transfer
which would allow you instantaneous consumption of your media. It might make sense to make this behavior configurable, because not everyone might agree with having partial content (that mismatches its key) around.
So what do you say?
The
git annex inprogress
command now can be used to more easily do what I was suggesting be done withgit annex find
below. done --Joey
I'm not at all comfortable with either idea. Temporarily repointing the symlink could lead to accidentally git committing a bad symlink. Or the user accidentally doing something with a partially transferred file. Running rsync in place would break lots of things that assume that, once the file is present, it can be assumed to be the full and correct file. (Obviously fsck doesn't assume that, but checks made by
git annex drop
do, for example.)However, you can access partially transferred files by key in
.git/annex/tmp
. It would be easy to write some hack that looks at the symlink to get the key, and then spits out the name of the partial file in.git/annex/tmp.
.There's now an easy way to do this:
Pass it the file or files you're interested in to get their partially transferred contents.