auto-configure filter.annex.smudge and clean on init

This commit is contained in:
Joey Hess 2015-12-04 16:14:11 -04:00
parent 723e4e31a1
commit 34ead644d9
Failed to extract signature
2 changed files with 7 additions and 1 deletions

View file

@ -85,7 +85,8 @@ initialize' = do
unlessM isBare $
hookWrite preCommitHook
setDifferences
setVersion supportedVersion
setVersion currentVersion
configureSmudgeFilter
ifM (crippledFileSystem <&&> not <$> isBare)
( do
enableDirectMode

View file

@ -90,3 +90,8 @@ setCrippledFileSystem :: Bool -> Annex ()
setCrippledFileSystem b = do
setConfig (annexConfig "crippledfilesystem") (Git.Config.boolConfig b)
Annex.changeGitConfig $ \c -> c { annexCrippledFileSystem = b }
configureSmudgeFilter :: Annex ()
configureSmudgeFilter = do
setConfig (ConfigKey "filter.annex.smudge") "git-annex smudge %f"
setConfig (ConfigKey "filter.annex.clean") "git-annex smudge --clean %f"