annex.largefiles support for clean filter
This commit is contained in:
parent
d349693269
commit
fdfda7b7bb
1 changed files with 5 additions and 3 deletions
|
@ -11,6 +11,7 @@ import Common.Annex
|
||||||
import Command
|
import Command
|
||||||
import Annex.Content
|
import Annex.Content
|
||||||
import Annex.MetaData
|
import Annex.MetaData
|
||||||
|
import Annex.FileMatcher
|
||||||
import Types.KeySource
|
import Types.KeySource
|
||||||
import Types.Key
|
import Types.Key
|
||||||
import Backend
|
import Backend
|
||||||
|
@ -39,8 +40,9 @@ start [] = error "clean filter run without filename; upgrade git"
|
||||||
start _ = error "clean filter passed multiple filenames"
|
start _ = error "clean filter passed multiple filenames"
|
||||||
|
|
||||||
shouldAnnex :: FilePath -> Annex Bool
|
shouldAnnex :: FilePath -> Annex Bool
|
||||||
shouldAnnex _ = return True
|
shouldAnnex file = do
|
||||||
-- TODO check annex.largefiles
|
matcher <- largeFilesMatcher
|
||||||
|
checkFileMatcher matcher file
|
||||||
|
|
||||||
ingest :: FilePath -> Annex Key
|
ingest :: FilePath -> Annex Key
|
||||||
ingest file = do
|
ingest file = do
|
||||||
|
@ -54,7 +56,7 @@ ingest file = do
|
||||||
<$> genKey source backend
|
<$> genKey source backend
|
||||||
-- Hard link (or copy) file content to annex
|
-- Hard link (or copy) file content to annex
|
||||||
-- to prevent it from being lost when git checks out
|
-- to prevent it from being lost when git checks out
|
||||||
-- a branch not contaning this file.
|
-- a branch not containing this file.
|
||||||
unlessM (linkAnnex k file) $
|
unlessM (linkAnnex k file) $
|
||||||
error "Problem adding file to the annex"
|
error "Problem adding file to the annex"
|
||||||
genMetaData k file
|
genMetaData k file
|
||||||
|
|
Loading…
Reference in a new issue