diff options
Diffstat (limited to 'Command')
-rw-r--r-- | Command/Indirect.hs | 2 | ||||
-rw-r--r-- | Command/Smudge.hs | 11 | ||||
-rw-r--r-- | Command/Undo.hs | 4 |
3 files changed, 6 insertions, 11 deletions
diff --git a/Command/Indirect.hs b/Command/Indirect.hs index c12c91a48..f5234b4dc 100644 --- a/Command/Indirect.hs +++ b/Command/Indirect.hs @@ -76,7 +76,7 @@ perform = do return Nothing | otherwise -> maybe noop (fromdirect f) - =<< catKey sha mode + =<< catKey sha _ -> noop go _ = noop diff --git a/Command/Smudge.hs b/Command/Smudge.hs index 6cca8035e..c2dc28540 100644 --- a/Command/Smudge.hs +++ b/Command/Smudge.hs @@ -11,6 +11,7 @@ import Common.Annex import Command import Types.Key import Annex.Content +import Annex.CatFile import Annex.MetaData import Annex.FileMatcher import Types.KeySource @@ -100,17 +101,11 @@ ingest file = do =<< liftIO (getFileStatus file) return k +-- Could add a newline and some text explaining this file is a pointer. +-- parsePointer only looks at the first line. emitPointer :: Key -> IO () emitPointer = putStrLn . key2file -parsePointer :: String -> Maybe Key -parsePointer s - | length s' >= maxsz = Nothing -- too long to be a key pointer - | otherwise = headMaybe (lines s') >>= file2key - where - s' = take maxsz s - maxsz = 81920 - updateAssociatedFiles :: Key -> FilePath -> Annex () updateAssociatedFiles k f = do h <- AssociatedFiles.openDb diff --git a/Command/Undo.hs b/Command/Undo.hs index c647dfba4..0692dce34 100644 --- a/Command/Undo.hs +++ b/Command/Undo.hs @@ -72,7 +72,7 @@ perform p = do f <- mkrel di whenM isDirect $ maybe noop (`removeDirect` f) - =<< catKey (srcsha di) (srcmode di) + =<< catKey (srcsha di) liftIO $ nukeFile f forM_ adds $ \di -> do @@ -80,6 +80,6 @@ perform p = do inRepo $ Git.run [Param "checkout", Param "--", File f] whenM isDirect $ maybe noop (`toDirect` f) - =<< catKey (dstsha di) (dstmode di) + =<< catKey (dstsha di) next $ liftIO cleanup |