fix test failure locking an unlocked not present file
In v5, that was not possible, but it is in v6, and so the test was failing. Investigating, it turns out that locking was copying the pointer file content to the annex object despite the content not being present. So, add a check to prevent that.
This commit is contained in:
parent
d667a68b7e
commit
0c1cc7789f
2 changed files with 5 additions and 3 deletions
|
@ -46,7 +46,7 @@ startNew file key = ifM (isJust <$> isAnnexLink file)
|
|||
)
|
||||
where
|
||||
go (Just key')
|
||||
| key' == key = cont False
|
||||
| key' == key = error "content not present; cannot lock"
|
||||
| otherwise = errorModified
|
||||
go Nothing =
|
||||
ifM (isUnmodified key file)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue