summaryrefslogtreecommitdiff
path: root/Annex
diff options
context:
space:
mode:
Diffstat (limited to 'Annex')
-rw-r--r--Annex/Direct.hs8
1 files changed, 5 insertions, 3 deletions
diff --git a/Annex/Direct.hs b/Annex/Direct.hs
index b66b2fdfd..a6c30ad08 100644
--- a/Annex/Direct.hs
+++ b/Annex/Direct.hs
@@ -14,8 +14,8 @@ import qualified Git.Merge
import qualified Git.DiffTree as DiffTree
import Git.Sha
import Git.Types
-import Annex.CatFile
import Git.FileMode
+import Annex.CatFile
import qualified Annex.Queue
import Logs.Location
import Backend
@@ -45,8 +45,10 @@ stageDirect = do
{- Determine what kind of modified or deleted file this is, as
- efficiently as we can, by getting any key that's associated
- with it in git, as well as its stat info. -}
- go (file, Just sha) = do
- shakey <- catKey sha
+ go (file, Just sha, Just mode) = do
+ shakey <- if isSymLink mode
+ then catKey sha
+ else return Nothing
mstat <- liftIO $ catchMaybeIO $ getSymbolicLinkStatus file
filekey <- isAnnexLink file
case (shakey, filekey, mstat, toInodeCache =<< mstat) of