cleanup
This commit is contained in:
parent
00988bcf36
commit
3d2a9f8405
11 changed files with 48 additions and 54 deletions
|
@ -23,14 +23,16 @@ seek = [withKeys start]
|
|||
start :: Key -> CommandStart
|
||||
start key = do
|
||||
present <- inAnnex key
|
||||
force <- Annex.getState Annex.force
|
||||
if not present
|
||||
then stop
|
||||
else if not force
|
||||
then error "dropkey is can cause data loss; use --force if you're sure you want to do this"
|
||||
else do
|
||||
showStart "dropkey" (show key)
|
||||
next $ perform key
|
||||
else do
|
||||
checkforced
|
||||
showStart "dropkey" (show key)
|
||||
next $ perform key
|
||||
where
|
||||
checkforced =
|
||||
unlessM (Annex.getState Annex.force) $
|
||||
error "dropkey can cause data loss; use --force if you're sure you want to do this"
|
||||
|
||||
perform :: Key -> CommandPerform
|
||||
perform key = do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue