unannex: New, much slower, but more safe behavior

Copies files out of the annex. This avoids an unannex of one file breaking
other files that link to the same content. Also, it means that the content
remains in the annex using up space until cleaned up with  "git annex
unused".

(The behavior of unannex --fast has not changed; it still hard
links to content in the annex. --fast was not made the default because it
is potentially unsafe; editing such a hard linked file can unexpectedly
change content stored in the annex.)
This commit is contained in:
Joey Hess 2013-10-28 16:56:01 -04:00
parent d16d71ce86
commit 0eff0dd910
6 changed files with 41 additions and 31 deletions

View file

@ -48,3 +48,10 @@ For this reason, it seems likely this is due to some sort of race condition.
This is on Ubuntu 12.04 with git-annex revision a1e2bc4.
> There was no good soluton to this, so I picked a bad one that
> will not have users complainging git-annex ate their data.
> They will complain that `git annex unannex` is slow since it now copies
> the file, and perhaps instead use --fast, and hopefully avoid destroying
> their own data by editing the resulting hard links.
>
> [[done]] --[[Joey]]

View file

@ -50,3 +50,5 @@ Now file1.txt is a normal 6-byte file again, but 2, 3, and 4 are broken symlinks
git-annex 4.20130802 package
on Debian GNU/Linux jessie/sid (testing), amd64.
> [[dup|done]] --[[Joey]]