diff options
Diffstat (limited to 'Command')
-rw-r--r-- | Command/Add.hs | 4 | ||||
-rw-r--r-- | Command/Fix.hs | 2 | ||||
-rw-r--r-- | Command/FromKey.hs | 2 | ||||
-rw-r--r-- | Command/Fsck.hs | 2 | ||||
-rw-r--r-- | Command/Indirect.hs | 2 |
5 files changed, 6 insertions, 6 deletions
diff --git a/Command/Add.hs b/Command/Add.hs index 2671126ca..51921fbc3 100644 --- a/Command/Add.hs +++ b/Command/Add.hs @@ -230,7 +230,7 @@ undo file key e = do {- Creates the symlink to the annexed content, returns the link target. -} link :: FilePath -> Key -> Maybe InodeCache -> Annex String link file key mcache = flip catchNonAsync (undo file key) $ do - l <- inRepo $ gitAnnexLink file key + l <- calcRepo $ gitAnnexLink file key replaceFile file $ makeAnnexLink l -- touch symlink to have same time as the original file, @@ -272,7 +272,7 @@ cleanup :: FilePath -> Key -> Maybe InodeCache -> Bool -> CommandCleanup cleanup file key mcache hascontent = do ifM (isDirect <&&> pure hascontent) ( do - l <- inRepo $ gitAnnexLink file key + l <- calcRepo $ gitAnnexLink file key stageSymlink file =<< hashSymlink l , addLink file key mcache ) diff --git a/Command/Fix.hs b/Command/Fix.hs index 1ef15d0eb..c981d23ae 100644 --- a/Command/Fix.hs +++ b/Command/Fix.hs @@ -28,7 +28,7 @@ seek = withFilesInGit $ whenAnnexed start {- Fixes the symlink to an annexed file. -} start :: FilePath -> Key -> CommandStart start file key = do - link <- inRepo $ gitAnnexLink file key + link <- calcRepo $ gitAnnexLink file key stopUnless ((/=) (Just link) <$> liftIO (catchMaybeIO $ readSymbolicLink file)) $ do showStart "fix" file next $ perform file link diff --git a/Command/FromKey.hs b/Command/FromKey.hs index 14a3d8176..d9ebe6b4c 100644 --- a/Command/FromKey.hs +++ b/Command/FromKey.hs @@ -33,7 +33,7 @@ start _ = error "specify a key and a dest file" perform :: Key -> FilePath -> CommandPerform perform key file = do - link <- inRepo $ gitAnnexLink file key + link <- calcRepo $ gitAnnexLink file key liftIO $ createDirectoryIfMissing True (parentDir file) liftIO $ createSymbolicLink link file next $ cleanup file diff --git a/Command/Fsck.hs b/Command/Fsck.hs index 46fe983d8..0242a1f75 100644 --- a/Command/Fsck.hs +++ b/Command/Fsck.hs @@ -192,7 +192,7 @@ check cs = and <$> sequence cs -} fixLink :: Key -> FilePath -> Annex Bool fixLink key file = do - want <- inRepo $ gitAnnexLink file key + want <- calcRepo $ gitAnnexLink file key have <- getAnnexLinkTarget file maybe noop (go want) have return True diff --git a/Command/Indirect.hs b/Command/Indirect.hs index 34a2ef8c9..1d703d2f3 100644 --- a/Command/Indirect.hs +++ b/Command/Indirect.hs @@ -88,7 +88,7 @@ perform = do v <- tryNonAsync (moveAnnex k f) case v of Right _ -> do - l <- inRepo $ gitAnnexLink f k + l <- calcRepo $ gitAnnexLink f k liftIO $ createSymbolicLink l f Left e -> catchNonAsync (Command.Add.undo f k e) warnlocked |