found a way to make uninit always fast

To do so, I slightly changed the behavior of unannex. Now in fast mode, it
only makes a hard link when the annexed file's link count is 1. This avoids
unannexing 2 files with the same content in fast mode from hard linking
them together. (One will end up hard linked to the annex, which the docs
warn about.)

With that change, uninit can simply always run unannex in fast mode. Since
.git/annex/objects is being blown away anyway, there's no worry in this
case about a hard link pointing into it causing an annexed object to be
modified.
This commit is contained in:
Joey Hess 2014-04-15 14:23:08 -04:00
parent 97210abe71
commit 03ce5cd8d2
Failed to extract signature
4 changed files with 13 additions and 5 deletions

1
debian/changelog vendored
View file

@ -15,6 +15,7 @@ git-annex (5.20140413) UNRELEASED; urgency=medium
connections.
* Improve handling of monthly/yearly scheduling.
* Avoid depending on shakespeare except for when building the webapp.
* uninit: Avoid making unncessary copies of files.
-- Joey Hess <joeyh@debian.org> Fri, 11 Apr 2014 21:33:35 -0400