git-annex/doc/internals/comment_18_1adce7945940b9c384c2383261388dd9._comment
Joey Hess 9d60385001
convert renameFile to moveFile to support cross-device moves
Improve handling of some .git/annex/ subdirectories being on other
filesystems, in the bittorrent special remote, and youtube-dl integration,
and git-annex addurl.

The only one of these that I've confirmed to be a problem is in the
bittorrent special remote when .git/annex/tmp and .git/annex/othertmp are
on different filesystems.

As well as auditing for renameFile, also audited for createLink, all of
those are ok as are the other remaining renameFile calls. Also audited all
code paths that use .git/annex/othertmp, and did not find any other
cross-device problems. So, removing mention of othertmp needing to be on
the same device.

Sponsored-by: Dartmouth College's Datalad project
2022-12-20 15:17:50 -04:00

17 lines
783 B
Text

[[!comment format=mdwn
username="joey"
subject="""re: why othertmp to be on the same file system?"""
date="2022-12-20T18:39:35Z"
content="""
I've audited the code and the only place I could find where it did not work
to have othertmp on a different filesystem is in the bittorrent special
remote when it downloads a torrent file. But that also failed when
`.git/annex/tmp` was on a different filesystem! (Since it was moving between
the two directories.) I've fixed that.
It's still best to keep things on the same filesystem because
cross-filesystem moves can be expensive and it sometimes falls back to less
ideal behavior in other ways too when operating across filesystems. Also
of course, you avoid being the one who gets to find and report breakage
like the above..
"""]]