Make lock and unlock work in v6 repos on files whose content is not present.

This commit is contained in:
Joey Hess 2016-06-09 14:40:44 -04:00
parent 0249f3aff5
commit 0bc7fee660
Failed to extract signature
4 changed files with 18 additions and 15 deletions

View file

@ -45,7 +45,7 @@ startNew file key = ifM (isJust <$> isAnnexLink file)
)
where
go (Just key')
| key' == key = error "content not present; cannot lock"
| key' == key = cont True
| otherwise = errorModified
go Nothing =
ifM (isUnmodified key file)