unannex: Now skips files whose content is not present, rather than it being an error. This allows gradual conversion from one backend to another by running unannex followed by add in each repository.

This commit is contained in:
Joey Hess 2011-01-08 15:14:41 -04:00
parent 82fe151f87
commit 32b0e10390
4 changed files with 33 additions and 6 deletions

View file

@ -29,8 +29,12 @@ seek = [withFilesInGit start]
{- The unannex subcommand undoes an add. -}
start :: CommandStartString
start file = isAnnexed file $ \(key, backend) -> do
showStart "unannex" file
return $ Just $ perform file key backend
ishere <- inAnnex key
if ishere
then do
showStart "unannex" file
return $ Just $ perform file key backend
else return Nothing
perform :: FilePath -> Key -> Backend -> CommandPerform
perform file key backend = do