From: Joey Hess Date: Fri, 4 Dec 2015 21:18:26 +0000 (-0400) Subject: refactor X-Git-Tag: archive/raspbian/10.20250416-2+rpi1~1^2~320^2~184^2~91 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=fb6ebdaae7a3c57cc27e2dfba2736497e0d61892;p=git-annex.git refactor --- diff --git a/Command/Smudge.hs b/Command/Smudge.hs index ddf81af437..70a318c2d5 100644 --- a/Command/Smudge.hs +++ b/Command/Smudge.hs @@ -39,8 +39,8 @@ seek :: SmudgeOptions -> CommandSeek seek o = commandAction $ (if cleanOption o then clean else smudge) (smudgeFile o) --- Smudge filter is fed git file content, and if it's a pointer, should --- emit the annex object content. +-- Smudge filter is fed git file content, and if it's a pointer to an +-- available annex object, should output its content. smudge :: FilePath -> CommandStart smudge _file = do liftIO $ fileEncoding stdin @@ -63,10 +63,13 @@ clean file = do ( do k <- ingest file liftIO $ emitPointer k - , liftIO $ B.hGetContents stdin >>= B.hPut stdout -- cat file + , liftIO cat ) stop +cat :: IO () +cat = B.hGetContents stdin >>= B.hPut stdout + shouldAnnex :: FilePath -> Annex Bool shouldAnnex file = do matcher <- largeFilesMatcher