only make 1 hardlink max between pointer file and annex object

If multiple files point to the same annex object, the user may want to
modify them independently, so don't use a hard link.

Also, check diskreserve when copying.
This commit is contained in:
Joey Hess 2015-12-11 13:56:12 -04:00
parent c608a752a5
commit 50e83b606c
Failed to extract signature
3 changed files with 40 additions and 14 deletions

View file

@ -86,7 +86,7 @@ ingest file = do
}
k <- fst . fromMaybe (error "failed to generate a key")
<$> genKey source backend
-- Hard link (or copy) file content to annex
-- Hard link (or copy) file content to annex object
-- to prevent it from being lost when git checks out
-- a branch not containing this file.
r <- linkAnnex k file