diff options
-rw-r--r-- | Annex/AutoMerge.hs | 4 | ||||
-rw-r--r-- | Command/Smudge.hs | 15 |
2 files changed, 2 insertions, 17 deletions
diff --git a/Annex/AutoMerge.hs b/Annex/AutoMerge.hs index 246a4858b..57f15e07c 100644 --- a/Annex/AutoMerge.hs +++ b/Annex/AutoMerge.hs @@ -30,7 +30,6 @@ import Annex.VariantFile import qualified Database.Keys import Annex.InodeSentinal import Utility.InodeCache -import Command.Smudge (withSmudgeDisabled) import qualified Data.Set as S import qualified Data.Map as M @@ -50,8 +49,7 @@ autoMergeFrom branch currbranch commitmode = do where go old = ifM isDirect ( mergeDirect currbranch old branch (resolveMerge old branch) commitmode - -- Avoid smudge filter populating files while merging. - , withSmudgeDisabled (Git.Merge.mergeNonInteractive branch commitmode) + , inRepo (Git.Merge.mergeNonInteractive branch commitmode) <||> (resolveMerge old branch <&&> commitResolvedMerge commitmode) ) diff --git a/Command/Smudge.hs b/Command/Smudge.hs index f17eeea2e..80c79554e 100644 --- a/Command/Smudge.hs +++ b/Command/Smudge.hs @@ -19,9 +19,6 @@ import Utility.InodeCache import Types.KeySource import Backend import Logs.Location -import Annex.Index (addGitEnv) -import Utility.Env -import qualified Git import qualified Database.Keys import qualified Data.ByteString.Lazy as B @@ -59,7 +56,7 @@ smudge file = do -- don't provide such modified content as it -- will be confusing. inAnnex will detect such -- modifications. - ifM ((not <$> smudgeDisabled) <&&> inAnnex k) + ifM (inAnnex k) ( do content <- calcRepo (gitAnnexLocation k) liftIO $ B.putStr . fromMaybe b @@ -69,16 +66,6 @@ smudge file = do Database.Keys.addAssociatedFile k file stop --- Environment variable to disable smudging providing the content of keys. -smudgeDisabled :: Annex Bool -smudgeDisabled = liftIO $ isJust <$> getEnv smudgeDisableEnv - -smudgeDisableEnv :: String -smudgeDisableEnv = "ANNEX_SMUDGE_DISABLE" - -withSmudgeDisabled :: (Git.Repo -> IO a) -> Annex a -withSmudgeDisabled a = inRepo $ \r -> addGitEnv r smudgeDisableEnv "1" >>= a - -- Clean filter is fed file content on stdin, decides if a file -- should be stored in the annex, and outputs a pointer to its -- injested content. |