summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-12-04 16:14:11 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-12-04 16:14:11 -0400
commitd75a080faaa49b02a433a8f9dd1bf922897f1e05 (patch)
treec01b1c3060d858f9e4499f7feb05b04d37122b0f
parentde1b6019bb6fc1225a2a02cabba8bc3cf193744b (diff)
auto-configure filter.annex.smudge and clean on init
-rw-r--r--Annex/Init.hs3
-rw-r--r--Config.hs5
2 files changed, 7 insertions, 1 deletions
diff --git a/Annex/Init.hs b/Annex/Init.hs
index 65e9aa474..b00e41218 100644
--- a/Annex/Init.hs
+++ b/Annex/Init.hs
@@ -85,7 +85,8 @@ initialize' = do
unlessM isBare $
hookWrite preCommitHook
setDifferences
- setVersion supportedVersion
+ setVersion currentVersion
+ configureSmudgeFilter
ifM (crippledFileSystem <&&> not <$> isBare)
( do
enableDirectMode
diff --git a/Config.hs b/Config.hs
index 4af4f1284..bddb8abe3 100644
--- a/Config.hs
+++ b/Config.hs
@@ -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"