updat
This commit is contained in:
parent
13514b6afc
commit
58c89565e9
2 changed files with 5 additions and 2 deletions
|
@ -14,6 +14,7 @@ import System.IO
|
||||||
|
|
||||||
import qualified Backend.File
|
import qualified Backend.File
|
||||||
import TypeInternals
|
import TypeInternals
|
||||||
|
import Core
|
||||||
|
|
||||||
backend :: Backend
|
backend :: Backend
|
||||||
backend = Backend.File.backend {
|
backend = Backend.File.backend {
|
||||||
|
@ -23,7 +24,9 @@ backend = Backend.File.backend {
|
||||||
|
|
||||||
-- checksum the file to get its key
|
-- checksum the file to get its key
|
||||||
keyValue :: FilePath -> Annex (Maybe Key)
|
keyValue :: FilePath -> Annex (Maybe Key)
|
||||||
keyValue file = liftIO $ pOpen ReadFromPipe "sha1sum" [file] $ \h -> do
|
keyValue file = do
|
||||||
|
showNote "checksum"
|
||||||
|
liftIO $ pOpen ReadFromPipe "sha1sum" [file] $ \h -> do
|
||||||
line <- hGetLine h
|
line <- hGetLine h
|
||||||
let bits = split " " line
|
let bits = split " " line
|
||||||
if (null bits)
|
if (null bits)
|
||||||
|
|
|
@ -149,7 +149,7 @@ attributes repo
|
||||||
{- Looks up a gitattributes value for each file in a list. -}
|
{- Looks up a gitattributes value for each file in a list. -}
|
||||||
checkAttr :: Repo -> String -> [FilePath] -> IO [(FilePath, String)]
|
checkAttr :: Repo -> String -> [FilePath] -> IO [(FilePath, String)]
|
||||||
checkAttr repo attr files = do
|
checkAttr repo attr files = do
|
||||||
(handle, s) <- pipeBoth "git" params files0
|
(_, s) <- pipeBoth "git" params files0
|
||||||
return $ map topair $ lines s
|
return $ map topair $ lines s
|
||||||
-- XXX handle is left open, this is ok for git-annex, but may need
|
-- XXX handle is left open, this is ok for git-annex, but may need
|
||||||
-- to be cleaned up for other uses.
|
-- to be cleaned up for other uses.
|
||||||
|
|
Loading…
Reference in a new issue