aboutsummaryrefslogtreecommitdiff
path: root/Command/Smudge.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-04-13 13:34:24 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-04-13 13:34:24 -0400
commit57b41a1ee78f1181e603b5fd3c563e9b7793620f (patch)
tree3ce89f33b8419d28239069507c7897581a639a1c /Command/Smudge.hs
parent28bdd2da48e3e7f1326cb34e38f3916bb09772a5 (diff)
smudge: Print a warning when annex.thin is set, as git's smudge interface does not allow honoring that configuration.
Diffstat (limited to 'Command/Smudge.hs')
-rw-r--r--Command/Smudge.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/Command/Smudge.hs b/Command/Smudge.hs
index 6718b4908..1e169c1bf 100644
--- a/Command/Smudge.hs
+++ b/Command/Smudge.hs
@@ -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