diff options
Diffstat (limited to 'Command/Reinject.hs')
-rw-r--r-- | Command/Reinject.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Command/Reinject.hs b/Command/Reinject.hs index fa2459e22..7d2da9420 100644 --- a/Command/Reinject.hs +++ b/Command/Reinject.hs @@ -16,8 +16,7 @@ import Types.KeySource cmd :: Command cmd = command "reinject" SectionUtility "inject content of file back into annex" - (paramRepeating (paramPair "SRC" "DEST") - `paramOr` "--known " ++ paramRepeating "SRC") + (paramRepeating (paramPair "SRC" "DEST")) (seek <$$> optParser) data ReinjectOptions = ReinjectOptions @@ -47,7 +46,7 @@ startSrcDest (src:dest:[]) next $ ifAnnexed dest (\key -> perform src key (verifyKeyContent DefaultVerify UnVerified key src)) stop -startSrcDest _ = error "specify a src file and a dest file" +startSrcDest _ = giveup "specify a src file and a dest file" startKnown :: FilePath -> CommandStart startKnown src = notAnnexed src $ do @@ -63,7 +62,8 @@ startKnown src = notAnnexed src $ do ) notAnnexed :: FilePath -> CommandStart -> CommandStart -notAnnexed src = ifAnnexed src (error $ "cannot used annexed file as src: " ++ src) +notAnnexed src = ifAnnexed src $ + giveup $ "cannot used annexed file as src: " ++ src perform :: FilePath -> Key -> Annex Bool -> CommandPerform perform src key verify = ifM move |