comments
authorJoey Hess <joeyh@joeyh.name>
Fri, 4 Dec 2015 20:46:00 +0000 (16:46 -0400)
committerJoey Hess <joeyh@joeyh.name>
Fri, 4 Dec 2015 20:46:00 +0000 (16:46 -0400)
Command/Smudge.hs

index 07a3e1805f870e8b3621e8df9ba342710a512811..ddf81af4375d82e3c6db63a949725a5908263529 100644 (file)
@@ -39,6 +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 :: FilePath -> CommandStart
 smudge _file = do
        liftIO $ fileEncoding stdin
@@ -53,6 +55,8 @@ smudge _file = do
                                =<< catchMaybeIO (B.readFile content)
        stop
 
+-- Clean filter decides if a file should be stored in the annex, and
+-- outputs a pointer to its injested content.
 clean :: FilePath -> CommandStart
 clean file = do
        ifM (shouldAnnex file)