summaryrefslogtreecommitdiff
path: root/Command
diff options
context:
space:
mode:
Diffstat (limited to 'Command')
-rw-r--r--Command/Reinject.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Command/Reinject.hs b/Command/Reinject.hs
index cfa0655ef..906f7c517 100644
--- a/Command/Reinject.hs
+++ b/Command/Reinject.hs
@@ -24,8 +24,9 @@ start :: [FilePath] -> CommandStart
start (src:dest:[])
| src == dest = stop
| otherwise = do
- showStart "reinject" dest
- next $ whenAnnexed (perform src) dest
+ ifAnnexed src
+ (error $ "cannot used annexed file as src: " ++ src)
+ (next $ whenAnnexed (perform src) dest)
start _ = error "specify a src file and a dest file"
perform :: FilePath -> FilePath -> (Key, Backend Annex) -> CommandPerform