smudge: Print a warning when annex.thin is set, as git's smudge interface does not allow honoring that configuration.

This commit is contained in:
Joey Hess 2016-04-13 13:34:24 -04:00
parent c47d7d0f7e
commit 402e5adab8
Failed to extract signature
4 changed files with 23 additions and 4 deletions

View file

@ -8,6 +8,7 @@
module Command.Smudge where
import Command
import qualified Annex
import Annex.Content
import Annex.Link
import Annex.FileMatcher
@ -54,6 +55,8 @@ smudge file = do
ifM (inAnnex k)
( do
content <- calcRepo (gitAnnexLocation k)
whenM (annexThin <$> Annex.getGitConfig) $
warning $ "Not able to honor annex.thin when git is checking out " ++ file ++ " (run git annex fix to re-thin files)"
liftIO $ B.putStr . fromMaybe b
=<< catchMaybeIO (B.readFile content)
, liftIO $ B.putStr b