summaryrefslogtreecommitdiff
path: root/Command/Smudge.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-01-07 17:39:59 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-01-07 17:48:04 -0400
commitbaa5f0ff25f3a3833c46b1e0d60242bd9066eaae (patch)
tree7f32eb02c862c5064fe8b71b1c7cffe96ea34998 /Command/Smudge.hs
parenta3a92b330d11737fbc46a5af4ed16190f4291d7c (diff)
avoid confusing git with a modified ctime in clean filter
Linking the file to the tmp dir was not necessary in the clean filter, and it caused the ctime to change, which caused git to think the file was changed. This caused git status to get slow as it kept re-cleaning unchanged files.
Diffstat (limited to 'Command/Smudge.hs')
-rw-r--r--Command/Smudge.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/Command/Smudge.hs b/Command/Smudge.hs
index 8b7d848d2..1ca3de2c3 100644
--- a/Command/Smudge.hs
+++ b/Command/Smudge.hs
@@ -72,7 +72,7 @@ clean file = do
then liftIO $ B.hPut stdout b
else ifM (shouldAnnex file)
( liftIO . emitPointer
- =<< go =<< ingest =<< lockDown False file
+ =<< go =<< ingest =<< lockDown cfg file
, liftIO $ B.hPut stdout b
)
stop
@@ -81,6 +81,10 @@ clean file = do
logStatus k InfoPresent
return k
go _ = error "could not add file to the annex"
+ cfg = LockDownConfig
+ { lockingFile = False
+ , hardlinkFileTmp = False
+ }
shouldAnnex :: FilePath -> Annex Bool
shouldAnnex file = do