aboutsummaryrefslogtreecommitdiff
path: root/Annex/CatFile.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-08-22 13:57:07 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-08-22 13:57:07 -0400
commitbc684aaac8572aaaa322ccb49a076bcf6d8faf1a (patch)
tree92ff749fef920aeefaf321023bd9fe10e273b9f2 /Annex/CatFile.hs
parent274630ac8460425a291ae122f0d5b390a87e5534 (diff)
Fix bug that caused typechanged symlinks to be assumed to be unlocked files, so they were added to the annex by the pre-commit hook.
Diffstat (limited to 'Annex/CatFile.hs')
-rw-r--r--Annex/CatFile.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/Annex/CatFile.hs b/Annex/CatFile.hs
index f90e74509..f70800302 100644
--- a/Annex/CatFile.hs
+++ b/Annex/CatFile.hs
@@ -12,6 +12,7 @@ module Annex.CatFile (
catFileHandle,
catKey,
catKeyFile,
+ catKeyFileHEAD,
) where
import qualified Data.ByteString.Lazy as L
@@ -87,6 +88,9 @@ catKey ref = do
-}
catKeyFile :: FilePath -> Annex (Maybe Key)
catKeyFile f = ifM (Annex.getState Annex.daemon)
- ( catKey $ Ref $ "HEAD:./" ++ f
+ ( catKeyFileHEAD f
, catKey $ Ref $ ":./" ++ f
)
+
+catKeyFileHEAD :: FilePath -> Annex (Maybe Key)
+catKeyFileHEAD f = catKey $ Ref $ "HEAD:./" ++ f